700
How can I filter the check-boxes (method 1)

local oGrid,var_Column,var_Editor,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
var_Column = oGrid.Columns.Add("Check")
	var_Editor = var_Column.Editor
		var_Editor.EditType = 19
		// var_Editor.Option(17) = 1
		with (oGrid)
			TemplateDef = [dim var_Editor]
			TemplateDef = var_Editor
			Template = [var_Editor.Option(17) = 1]
		endwith
	var_Column.DisplayFilterButton = true
	var_Column.DisplayFilterPattern = false
	var_Column.FilterType = 6
var_Items = oGrid.Items
	var_Items.AddItem(true)
	var_Items.AddItem(true)
	var_Items.AddItem(false)
	var_Items.AddItem(true)
	var_Items.AddItem(false)
	var_Items.AddItem(true)
	var_Items.AddItem(false)

699
How can add a button to control

/*
with (this.EXGRIDACTIVEXCONTROL1.nativeObject)
	ButtonClick = class::nativeObject_ButtonClick
endwith
*/
// Occurs when user clicks on the cell's button.
function nativeObject_ButtonClick(Item,ColIndex,Key)
	oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
	? "ButtonClick" 
	? oGrid.Items.CellCaption(Item,ColIndex) 
	? Str(Key) 
return

local h,oGrid,s,var_Column,var_Column1,var_Columns,var_Editor,var_Editor1,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.DefaultItemHeight = 22
oGrid.HeaderHeight = 22
oGrid.Appearance = 0
oGrid.DrawGridLines = -2
oGrid.ScrollBySingleLine = false
oGrid.Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
oGrid.Template = [HTMLPicture("pic1") = "c:\exontrol\images\auction.gif"] // oGrid.HTMLPicture("pic1") = "c:\exontrol\images\auction.gif"
var_Columns = oGrid.Columns
	var_Column = var_Columns.Add("Type")
		var_Column.Width = 48
		// var_Column.Def(17) = 1
		with (oGrid)
			TemplateDef = [dim var_Column]
			TemplateDef = var_Column
			Template = [var_Column.Def(17) = 1]
		endwith
	var_Column1 = var_Columns.Add("Appearance")
		// var_Column1.Def(17) = 1
		with (oGrid)
			TemplateDef = [dim var_Column1]
			TemplateDef = var_Column1
			Template = [var_Column1.Def(17) = 1]
		endwith
		var_Column1.Alignment = 1
		var_Column1.HeaderAlignment = 1
var_Items = oGrid.Items
	h = var_Items.AddItem("Items.<b>CellHasButton</b> property")
	// var_Items.CellValue(h,1) = "Button <b>1</b>"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValue(h,1) = "Button <b>1</b>"]
	endwith
	// var_Items.CellHasButton(h,1) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellHasButton(h,1) = True]
	endwith
	h = var_Items.AddItem("Items.<b>CellButtonAutoWidth</b> property")
	// var_Items.CellValue(h,1) = " Button <b>2</b> "
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValue(h,1) = " Button <b>2</b> "]
	endwith
	// var_Items.CellHasButton(h,1) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellHasButton(h,1) = True]
	endwith
	// var_Items.CellButtonAutoWidth(h,1) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellButtonAutoWidth(h,1) = True]
	endwith
	h = var_Items.AddItem("Items.<b>CellHasButton</b> property")
	// var_Items.CellValue(h,1) = " <img>2</img>Button <b>3</b> "
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValue(h,1) = " <img>2</img>Button <b>3</b> "]
	endwith
	// var_Items.CellHasButton(h,1) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellHasButton(h,1) = True]
	endwith
	// var_Items.CellButtonAutoWidth(h,1) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellButtonAutoWidth(h,1) = True]
	endwith
	h = var_Items.AddItem("Items.<b>CellHasButton</b> property")
	// var_Items.ItemHeight(h) = 32
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ItemHeight(h) = 32]
	endwith
	// var_Items.CellValue(h,1) = " <img>2</img>Button <b>4</b> <img>pic1</img> "
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValue(h,1) = " <img>2</img>Button <b>4</b> <img>pic1</img> "]
	endwith
	// var_Items.CellHasButton(h,1) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellHasButton(h,1) = True]
	endwith
	// var_Items.CellButtonAutoWidth(h,1) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellButtonAutoWidth(h,1) = True]
	endwith
	h = var_Items.AddItem("Items.<b>CellHasButton</b> in splitted cells")
	// var_Items.CellValue(h,1) = " Button <b>5.1</b> "
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValue(h,1) = " Button <b>5.1</b> "]
	endwith
	// var_Items.CellHasButton(h,1) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellHasButton(h,1) = True]
	endwith
	// var_Items.CellButtonAutoWidth(h,1) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellButtonAutoWidth(h,1) = True]
	endwith
	s = var_Items.SplitCell(h,1)
	// var_Items.CellValue(0,s) = " Button <b>5.2</b> "
	with (oGrid)
		TemplateDef = [dim var_Items,s]
		TemplateDef = var_Items
		TemplateDef = s
		Template = [var_Items.CellValue(0,s) = " Button <b>5.2</b> "]
	endwith
	// var_Items.CellHasButton(0,s) = true
	with (oGrid)
		TemplateDef = [dim var_Items,s]
		TemplateDef = var_Items
		TemplateDef = s
		Template = [var_Items.CellHasButton(0,s) = True]
	endwith
	// var_Items.CellButtonAutoWidth(0,s) = true
	with (oGrid)
		TemplateDef = [dim var_Items,s]
		TemplateDef = var_Items
		TemplateDef = s
		Template = [var_Items.CellButtonAutoWidth(0,s) = True]
	endwith
	h = var_Items.AddItem("Column.<b>Editor</b>, Items.<b>CellEditor</b>")
	// var_Items.CellValue(h,1) = "Visible when clicking the cell"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValue(h,1) = "Visible when clicking the cell"]
	endwith
	var_Editor = var_Items.CellEditor(h,1)
		var_Editor.EditType = 1
		var_Editor.AddButton("B1",1,0,"This is a bit of text that's shown when the cursor hovers the button B1")
		var_Editor.AddButton("B3",2,1,"This is a bit of text that's shown when the cursor hovers the button B3")
		var_Editor.AddButton("B4",1,1,"This is a bit of text that's shown when the cursor hovers the button B4")
		var_Editor.ButtonWidth = 24
	h = var_Items.AddItem("Column.<b>Editor</b>, Items.<b>CellEditor</b>")
	// var_Items.CellValue(h,1) = 3
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValue(h,1) = 3]
	endwith
	var_Editor1 = var_Items.CellEditor(h,1)
		var_Editor1.EditType = 6
		var_Editor1.AddItem(1,"Flag 1")
		var_Editor1.AddItem(2,"Flag 2")
		var_Editor1.AddItem(4,"Flag 4")
		var_Editor1.AddItem(8,"Flag 8")
		var_Editor1.AddButton("C1",1,0,"This is a bit of text that's shown when the cursor hovers the button C1")
		var_Editor1.AddButton("C3",2,0,"This is a bit of text that's shown when the cursor hovers the button C2")
		var_Editor1.AddButton("C4",1,0,"This is a bit of text that's shown when the cursor hovers the button C3")
		var_Editor1.ButtonWidth = 24
oGrid.EndUpdate()

698
The item is not getting selected when clicking the cell's checkbox. What should I do

/*
with (this.EXGRIDACTIVEXCONTROL1.nativeObject)
	CellStateChanged = class::nativeObject_CellStateChanged
endwith
*/
// Fired after cell's state has been changed.
function nativeObject_CellStateChanged(Item,ColIndex)
	local var_Items
	oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
	// oGrid.Items.SelectItem(Item) = true
	var_Items = oGrid.Items
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.SelectItem(Item) = True]
	endwith
return

local oGrid,var_Column,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
// oGrid.Columns.Add("Check").Def(0) = true
var_Column = oGrid.Columns.Add("Check")
with (oGrid)
	TemplateDef = [dim var_Column]
	TemplateDef = var_Column
	Template = [var_Column.Def(0) = True]
endwith
var_Items = oGrid.Items
	var_Items.AddItem(0)
	var_Items.AddItem(1)
	var_Items.AddItem(2)
	var_Items.AddItem(3)

697
Is it possible to limit the height of the item while resizing

/*
with (this.EXGRIDACTIVEXCONTROL1.nativeObject)
	AddItem = class::nativeObject_AddItem
endwith
*/
// Occurs after a new Item has been inserted to Items collection.
function nativeObject_AddItem(Item)
	local var_Items,var_Items1
	oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
	// oGrid.Items.ItemMinHeight(Item) = 18
	var_Items = oGrid.Items
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.ItemMinHeight(Item) = 18]
	endwith
	// oGrid.Items.ItemMaxHeight(Item) = 72
	var_Items1 = oGrid.Items
	with (oGrid)
		TemplateDef = [dim var_Items1]
		TemplateDef = var_Items1
		Template = [var_Items1.ItemMaxHeight(Item) = 72]
	endwith
return

local oGrid,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.ItemsAllowSizing = -1
oGrid.ScrollBySingleLine = false
oGrid.BackColorAlternate = 0xf0f0f0
oGrid.Columns.Add("Names")
var_Items = oGrid.Items
	var_Items.AddItem("Mantel")
	var_Items.AddItem("Mechanik")
	var_Items.AddItem("Motor")
	var_Items.AddItem("Murks")
	var_Items.AddItem("Märchen")
	var_Items.AddItem("Möhren")
	var_Items.AddItem("Mühle")
oGrid.Columns.Item(0).SortOrder = 1
oGrid.EndUpdate()

696
Is it possible to copy the hierarchy of the control using the GetItems method

local h,oGrid,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.LinesAtRoot = -1
oGrid.Columns.Add("Def")
var_Items = oGrid.Items
	h = var_Items.AddItem("Root")
	var_Items.InsertItem(h,null,"Child 1")
	var_Items.InsertItem(h,null,"Child 2")
oGrid.PutItems(oGrid.GetItems(-1))

695
Is it possible to auto-numbering the children items but still keeps the position after filtering

local h,oGrid,var_Column,var_Column1,var_Column2,var_Column3,var_Column4,var_Column5,var_Column6,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.LinesAtRoot = -1
var_Column = oGrid.Columns.Add("Items")
	var_Column.DisplayFilterButton = true
	var_Column.FilterType = 240
	var_Column.Filter = "Child 2"
var_Column1 = oGrid.Columns.Add("Pos.1")
	var_Column1.FormatColumn = "1 ropos ''"
	var_Column1.Position = 0
	var_Column1.Width = 32
	var_Column1.AllowSizing = false
var_Column2 = oGrid.Columns.Add("Pos.2")
	var_Column2.FormatColumn = "1 ropos ':'"
	var_Column2.Position = 1
	var_Column2.Width = 32
	var_Column2.AllowSizing = false
var_Column3 = oGrid.Columns.Add("Pos.3")
	var_Column3.FormatColumn = "1 ropos ':|A-Z'"
	var_Column3.Position = 2
	var_Column3.Width = 32
	var_Column3.AllowSizing = false
var_Column4 = oGrid.Columns.Add("Pos.4")
	var_Column4.FormatColumn = "1 ropos '|A-Z|'"
	var_Column4.Position = 3
	var_Column4.Width = 32
	var_Column4.AllowSizing = false
var_Column5 = oGrid.Columns.Add("Pos.5")
	var_Column5.FormatColumn = "'<font Tahoma;7>' + 1 ropos '-<b>||A-Z'"
	// var_Column5.Def(17) = 1
	with (oGrid)
		TemplateDef = [dim var_Column5]
		TemplateDef = var_Column5
		Template = [var_Column5.Def(17) = 1]
	endwith
	var_Column5.Position = 4
	var_Column5.Width = 32
	var_Column5.AllowSizing = false
var_Column6 = oGrid.Columns.Add("Pos.6")
	var_Column6.FormatColumn = "'<b>'+ 1 ropos '</b>:<fgcolor=FF0000>|A-Z|'"
	// var_Column6.Def(17) = 1
	with (oGrid)
		TemplateDef = [dim var_Column6]
		TemplateDef = var_Column6
		Template = [var_Column6.Def(17) = 1]
	endwith
	var_Column6.Position = 5
	var_Column6.Width = 48
	var_Column6.AllowSizing = false
var_Items = oGrid.Items
	h = var_Items.AddItem("Root 1")
	var_Items.InsertItem(h,null,"Child 1")
	var_Items.InsertItem(h,null,"Child 2")
	// var_Items.ExpandItem(h) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ExpandItem(h) = True]
	endwith
	h = var_Items.AddItem("Root 2")
	var_Items.InsertItem(h,null,"Child 1")
	var_Items.InsertItem(h,null,"Child 2")
oGrid.ApplyFilter()
oGrid.EndUpdate()

694
Is it possible to auto-numbering the children items too

local h,oGrid,var_Column,var_Column1,var_Column2,var_Column3,var_Column4,var_Column5,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.LinesAtRoot = -1
oGrid.Columns.Add("Items")
var_Column = oGrid.Columns.Add("Pos.1")
	var_Column.FormatColumn = "1 rpos ''"
	var_Column.Position = 0
	var_Column.Width = 32
	var_Column.AllowSizing = false
var_Column1 = oGrid.Columns.Add("Pos.2")
	var_Column1.FormatColumn = "1 rpos ':'"
	var_Column1.Position = 1
	var_Column1.Width = 32
	var_Column1.AllowSizing = false
var_Column2 = oGrid.Columns.Add("Pos.3")
	var_Column2.FormatColumn = "1 rpos ':|A-Z'"
	var_Column2.Position = 2
	var_Column2.Width = 32
	var_Column2.AllowSizing = false
var_Column3 = oGrid.Columns.Add("Pos.4")
	var_Column3.FormatColumn = "1 rpos '|A-Z|'"
	var_Column3.Position = 3
	var_Column3.Width = 32
	var_Column3.AllowSizing = false
var_Column4 = oGrid.Columns.Add("Pos.5")
	var_Column4.FormatColumn = "'<font Tahoma;7>' + 1 rpos '-<b>||A-Z'"
	// var_Column4.Def(17) = 1
	with (oGrid)
		TemplateDef = [dim var_Column4]
		TemplateDef = var_Column4
		Template = [var_Column4.Def(17) = 1]
	endwith
	var_Column4.Position = 4
	var_Column4.Width = 32
	var_Column4.AllowSizing = false
var_Column5 = oGrid.Columns.Add("Pos.6")
	var_Column5.FormatColumn = "'<b>'+ 1 rpos '</b>:<fgcolor=FF0000>|A-Z|'"
	// var_Column5.Def(17) = 1
	with (oGrid)
		TemplateDef = [dim var_Column5]
		TemplateDef = var_Column5
		Template = [var_Column5.Def(17) = 1]
	endwith
	var_Column5.Position = 5
	var_Column5.Width = 48
	var_Column5.AllowSizing = false
var_Items = oGrid.Items
	h = var_Items.AddItem("Root 1")
	var_Items.InsertItem(h,null,"Child 1")
	var_Items.InsertItem(h,null,"Child 2")
	// var_Items.ExpandItem(h) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ExpandItem(h) = True]
	endwith
	h = var_Items.AddItem("Root 2")
	var_Items.InsertItem(h,null,"Child 1")
	var_Items.InsertItem(h,null,"Child 2")
oGrid.EndUpdate()

693
Is it possible to cancel or discard the values during validation

/*
with (this.EXGRIDACTIVEXCONTROL1.nativeObject)
	ValidateValue = class::nativeObject_ValidateValue
endwith
*/
// Occurs before user changes the cell's value.
function nativeObject_ValidateValue(Item,ColIndex,NewValue,Cancel)
	oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
	? "ValidateValue" 
	? Str(NewValue) 
	? "Change the Cancel parameter for ValidateValue event to accept/decline the newly value. " 
	? "The DiscardValidateValue restores back the previously values." 
	oGrid.DiscardValidateValue()
return

local oGrid,var_Editor,var_Editor1,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.CauseValidateValue = -1
// oGrid.Columns.Add("Date").Editor.EditType = 7
var_Editor = oGrid.Columns.Add("Date").Editor
with (oGrid)
	TemplateDef = [dim var_Editor]
	TemplateDef = var_Editor
	Template = [var_Editor.EditType = 7]
endwith
// oGrid.Columns.Add("Text").Editor.EditType = 1
var_Editor1 = oGrid.Columns.Add("Text").Editor
with (oGrid)
	TemplateDef = [dim var_Editor1]
	TemplateDef = var_Editor1
	Template = [var_Editor1.EditType = 1]
endwith
var_Items = oGrid.Items
	// var_Items.CellValue(var_Items.AddItem("01/01/2001"),1) = "text"
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(AddItem(#1/1/2001#),1) = "text"]
	endwith
	// var_Items.CellValue(var_Items.AddItem("01/01/2001"),1) = "text"
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(AddItem(#1/1/2001#),1) = "text"]
	endwith
	// var_Items.CellValue(var_Items.AddItem("01/01/2001"),1) = "text"
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(AddItem(#1/1/2001#),1) = "text"]
	endwith
	// var_Items.CellValue(var_Items.AddItem("01/01/2001"),1) = "text"
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(AddItem(#1/1/2001#),1) = "text"]
	endwith
	// var_Items.CellValue(var_Items.AddItem("01/01/2001"),1) = "text"
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(AddItem(#1/1/2001#),1) = "text"]
	endwith
oGrid.EndUpdate()

692
Is it possible to validate the values of the cells only when user leaves the focused item
/*
with (this.EXGRIDACTIVEXCONTROL1.nativeObject)
	ValidateValue = class::nativeObject_ValidateValue
endwith
*/
// Occurs before user changes the cell's value.
function nativeObject_ValidateValue(Item,ColIndex,NewValue,Cancel)
	oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
	? "ValidateValue" 
	? Str(NewValue) 
	? "Change the Cancel parameter for ValidateValue event to accept/decline the newly value. " 
	Cancel = true
	? "You can not leave the item/record until the Cancel is False." 
return

local oGrid,var_Editor,var_Editor1,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.CauseValidateValue = 1
// oGrid.Columns.Add("Date").Editor.EditType = 7
var_Editor = oGrid.Columns.Add("Date").Editor
with (oGrid)
	TemplateDef = [dim var_Editor]
	TemplateDef = var_Editor
	Template = [var_Editor.EditType = 7]
endwith
// oGrid.Columns.Add("Text").Editor.EditType = 1
var_Editor1 = oGrid.Columns.Add("Text").Editor
with (oGrid)
	TemplateDef = [dim var_Editor1]
	TemplateDef = var_Editor1
	Template = [var_Editor1.EditType = 1]
endwith
var_Items = oGrid.Items
	// var_Items.CellValue(var_Items.AddItem("01/01/2001"),1) = "text"
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(AddItem(#1/1/2001#),1) = "text"]
	endwith
	// var_Items.CellValue(var_Items.AddItem("01/01/2001"),1) = "text"
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(AddItem(#1/1/2001#),1) = "text"]
	endwith
	// var_Items.CellValue(var_Items.AddItem("01/01/2001"),1) = "text"
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(AddItem(#1/1/2001#),1) = "text"]
	endwith
	// var_Items.CellValue(var_Items.AddItem("01/01/2001"),1) = "text"
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(AddItem(#1/1/2001#),1) = "text"]
	endwith
	// var_Items.CellValue(var_Items.AddItem("01/01/2001"),1) = "text"
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(AddItem(#1/1/2001#),1) = "text"]
	endwith
oGrid.EndUpdate()

691
We would like to validate the values of the cells. Is it possible

/*
with (this.EXGRIDACTIVEXCONTROL1.nativeObject)
	ValidateValue = class::nativeObject_ValidateValue
endwith
*/
// Occurs before user changes the cell's value.
function nativeObject_ValidateValue(Item,ColIndex,NewValue,Cancel)
	oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
	? "ValidateValue" 
	? Str(NewValue) 
	? "Change the Cancel parameter for ValidateValue event to accept/decline the newly value." 
	Cancel = true
	? "You can not leave the cell until the Cancel is False." 
return

local oGrid,var_Editor,var_Editor1,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.CauseValidateValue = -1
// oGrid.Columns.Add("Date").Editor.EditType = 7
var_Editor = oGrid.Columns.Add("Date").Editor
with (oGrid)
	TemplateDef = [dim var_Editor]
	TemplateDef = var_Editor
	Template = [var_Editor.EditType = 7]
endwith
// oGrid.Columns.Add("Text").Editor.EditType = 1
var_Editor1 = oGrid.Columns.Add("Text").Editor
with (oGrid)
	TemplateDef = [dim var_Editor1]
	TemplateDef = var_Editor1
	Template = [var_Editor1.EditType = 1]
endwith
var_Items = oGrid.Items
	// var_Items.CellValue(var_Items.AddItem("01/01/2001"),1) = "text"
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(AddItem(#1/1/2001#),1) = "text"]
	endwith
	// var_Items.CellValue(var_Items.AddItem("01/01/2001"),1) = "text"
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(AddItem(#1/1/2001#),1) = "text"]
	endwith
	// var_Items.CellValue(var_Items.AddItem("01/01/2001"),1) = "text"
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(AddItem(#1/1/2001#),1) = "text"]
	endwith
	// var_Items.CellValue(var_Items.AddItem("01/01/2001"),1) = "text"
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(AddItem(#1/1/2001#),1) = "text"]
	endwith
	// var_Items.CellValue(var_Items.AddItem("01/01/2001"),1) = "text"
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(AddItem(#1/1/2001#),1) = "text"]
	endwith
oGrid.EndUpdate()

690
Is there any way to add auto-numbering

local oGrid,var_Column,var_Columns,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
var_Columns = oGrid.Columns
	var_Columns.Add("Items")
	var_Column = var_Columns.Add("Pos")
		var_Column.FormatColumn = "1 pos ''"
		var_Column.Position = 0
var_Items = oGrid.Items
	var_Items.AddItem("Item 1")
	var_Items.AddItem("Item 2")
	var_Items.AddItem("Item 3")

689
Does your control supports multiple lines tooltip

local oGrid,var_Column

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.Template = [HTMLPicture("pic1") = "c:\exontrol\images\zipdisk.gif"] // oGrid.HTMLPicture("pic1") = "c:\exontrol\images\zipdisk.gif"
oGrid.ToolTipDelay = 1
// oGrid.Columns.Add("tootip").ToolTip = "<br><font Tahoma;10>This</font> is a <b>multi-lines</b> tooltip assigned to a column. The tooltip supports built-in HTML tags, icons and pictures.<br><br><br><img>pic1</img> picture ... <br><br>"
var_Column = oGrid.Columns.Add("tootip")
with (oGrid)
	TemplateDef = [dim var_Column]
	TemplateDef = var_Column
	Template = [var_Column.ToolTip = "<br><font Tahoma;10>This</font> is a <b>multi-lines</b> tooltip assigned to a column. The tooltip supports built-in HTML tags, icons and pictures.<br><br><br><img>pic1</img> picture ... <br><br>"]
endwith

688
How can I prevent highlighting the column from the cursor - point

local oGrid,var_Column,var_Column1,var_Column2,var_Column3,var_Column4,var_Column5,var_Column6,var_Column7

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.VisualAppearance.Add(1,"gBFLBCJwBAEHhEJAEGg4BI0IQAAYAQGKIYBkAKBQAGaAoDDUOQzQwAAxDKKUEwsACEIrjKCYVgOHYYRrIMYgBCMJhLEoaZLhEZRQiqDYtRDFQBSDDcPw/EaRZohGaYJgEgI=")
oGrid.Template = [Background(32) = 16777216] // oGrid.Background(32) = 0x1000000
// oGrid.Columns.Add("S").Width = 32
var_Column = oGrid.Columns.Add("S")
with (oGrid)
	TemplateDef = [dim var_Column]
	TemplateDef = var_Column
	Template = [var_Column.Width = 32]
endwith
// oGrid.Columns.Add("Level 1").LevelKey = 1
var_Column1 = oGrid.Columns.Add("Level 1")
with (oGrid)
	TemplateDef = [dim var_Column1]
	TemplateDef = var_Column1
	Template = [var_Column1.LevelKey = 1]
endwith
// oGrid.Columns.Add("Level 2").LevelKey = 1
var_Column2 = oGrid.Columns.Add("Level 2")
with (oGrid)
	TemplateDef = [dim var_Column2]
	TemplateDef = var_Column2
	Template = [var_Column2.LevelKey = 1]
endwith
// oGrid.Columns.Add("Level 3").LevelKey = 1
var_Column3 = oGrid.Columns.Add("Level 3")
with (oGrid)
	TemplateDef = [dim var_Column3]
	TemplateDef = var_Column3
	Template = [var_Column3.LevelKey = 1]
endwith
// oGrid.Columns.Add("E1").Width = 32
var_Column4 = oGrid.Columns.Add("E1")
with (oGrid)
	TemplateDef = [dim var_Column4]
	TemplateDef = var_Column4
	Template = [var_Column4.Width = 32]
endwith
// oGrid.Columns.Add("E2").Width = 32
var_Column5 = oGrid.Columns.Add("E2")
with (oGrid)
	TemplateDef = [dim var_Column5]
	TemplateDef = var_Column5
	Template = [var_Column5.Width = 32]
endwith
// oGrid.Columns.Add("E3").Width = 32
var_Column6 = oGrid.Columns.Add("E3")
with (oGrid)
	TemplateDef = [dim var_Column6]
	TemplateDef = var_Column6
	Template = [var_Column6.Width = 32]
endwith
// oGrid.Columns.Add("E4").Width = 32
var_Column7 = oGrid.Columns.Add("E4")
with (oGrid)
	TemplateDef = [dim var_Column7]
	TemplateDef = var_Column7
	Template = [var_Column7.Width = 32]
endwith

687
Is it possible display numbers in the same format no matter of regional settings in the control panel

local h,oGrid,var_Column,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
// oGrid.Columns.Add("Def").Def(17) = 1
var_Column = oGrid.Columns.Add("Def")
with (oGrid)
	TemplateDef = [dim var_Column]
	TemplateDef = var_Column
	Template = [var_Column.Def(17) = 1]
endwith
var_Items = oGrid.Items
	h = var_Items.AddItem(100000.27)
	// var_Items.FormatCell(h,0) = "(value format '') +  ' <fgcolor=808080>(default positive)'"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.FormatCell(h,0) = "(value format '') +  ' <fgcolor=808080>(default positive)'"]
	endwith
	h = var_Items.AddItem(100000.27)
	// var_Items.FormatCell(h,0) = "(value format '2|.|3|,|1|1')"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.FormatCell(h,0) = "(value format '2|.|3|,|1|1')"]
	endwith
	h = var_Items.AddItem(-100000.27)
	// var_Items.FormatCell(h,0) = "(value format '') +  ' <fgcolor=808080>(default negative)'"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.FormatCell(h,0) = "(value format '') +  ' <fgcolor=808080>(default negative)'"]
	endwith
	h = var_Items.AddItem(-100000.27)
	// var_Items.FormatCell(h,0) = "(value format '2|.|3|,|1|1')"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.FormatCell(h,0) = "(value format '2|.|3|,|1|1')"]
	endwith
oGrid.EndUpdate()

686
Is it possible to add a 0 for numbers less than 1 instead .7 to show 0.8

local h,oGrid,var_Column,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
// oGrid.Columns.Add("Def").Def(17) = 1
var_Column = oGrid.Columns.Add("Def")
with (oGrid)
	TemplateDef = [dim var_Column]
	TemplateDef = var_Column
	Template = [var_Column.Def(17) = 1]
endwith
var_Items = oGrid.Items
	h = var_Items.AddItem(0.27)
	// var_Items.FormatCell(h,0) = "(value format '') +  ' <fgcolor=808080>(default)'"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.FormatCell(h,0) = "(value format '') +  ' <fgcolor=808080>(default)'"]
	endwith
	h = var_Items.AddItem(0.27)
	// var_Items.FormatCell(h,0) = "(value format '|||||0') +  ' <fgcolor=808080>(Display no leading zeros)'"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.FormatCell(h,0) = "(value format '|||||0') +  ' <fgcolor=808080>(Display no leading zeros)'"]
	endwith
oGrid.EndUpdate()

685
How can I specify the format for negative numbers

local h,oGrid,var_Column,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
// oGrid.Columns.Add("Def").Def(17) = 1
var_Column = oGrid.Columns.Add("Def")
with (oGrid)
	TemplateDef = [dim var_Column]
	TemplateDef = var_Column
	Template = [var_Column.Def(17) = 1]
endwith
var_Items = oGrid.Items
	h = var_Items.AddItem(-100000.27)
	// var_Items.FormatCell(h,0) = "(value format '') +  ' <fgcolor=808080>(default)'"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.FormatCell(h,0) = "(value format '') +  ' <fgcolor=808080>(default)'"]
	endwith
	h = var_Items.AddItem(-100000.27)
	// var_Items.FormatCell(h,0) = "(value format '||||1') +  ' <fgcolor=808080>(Negative sign, number; for example, -1.1)'"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.FormatCell(h,0) = "(value format '||||1') +  ' <fgcolor=808080>(Negative sign, number; for example, -1.1)'"]
	endwith
oGrid.EndUpdate()

684
Is it possible to change the grouping character when display numbers

local h,oGrid,var_Column,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
// oGrid.Columns.Add("Def").Def(17) = 1
var_Column = oGrid.Columns.Add("Def")
with (oGrid)
	TemplateDef = [dim var_Column]
	TemplateDef = var_Column
	Template = [var_Column.Def(17) = 1]
endwith
var_Items = oGrid.Items
	h = var_Items.AddItem(100000.27)
	// var_Items.FormatCell(h,0) = "(value format '') +  ' <fgcolor=808080>(default)'"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.FormatCell(h,0) = "(value format '') +  ' <fgcolor=808080>(default)'"]
	endwith
	h = var_Items.AddItem(100000.27)
	// var_Items.FormatCell(h,0) = "(value format '|||-') +  ' <fgcolor=808080>(grouping character is -)'"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.FormatCell(h,0) = "(value format '|||-') +  ' <fgcolor=808080>(grouping character is -)'"]
	endwith
oGrid.EndUpdate()

683
How can I display numbers with 2 digits in each group

local h,oGrid,var_Column,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
// oGrid.Columns.Add("Def").Def(17) = 1
var_Column = oGrid.Columns.Add("Def")
with (oGrid)
	TemplateDef = [dim var_Column]
	TemplateDef = var_Column
	Template = [var_Column.Def(17) = 1]
endwith
var_Items = oGrid.Items
	h = var_Items.AddItem(100000.27)
	// var_Items.FormatCell(h,0) = "(value format '') +  ' <fgcolor=808080>(default)'"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.FormatCell(h,0) = "(value format '') +  ' <fgcolor=808080>(default)'"]
	endwith
	h = var_Items.AddItem(100000.27)
	// var_Items.FormatCell(h,0) = "(value format '||2') +  ' <fgcolor=808080>(grouping by 2 digits)'"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.FormatCell(h,0) = "(value format '||2') +  ' <fgcolor=808080>(grouping by 2 digits)'"]
	endwith
oGrid.EndUpdate()

682
How can I display my numbers using a different decimal separator

local h,oGrid,var_Column,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
// oGrid.Columns.Add("Def").Def(17) = 1
var_Column = oGrid.Columns.Add("Def")
with (oGrid)
	TemplateDef = [dim var_Column]
	TemplateDef = var_Column
	Template = [var_Column.Def(17) = 1]
endwith
var_Items = oGrid.Items
	h = var_Items.AddItem(100.27)
	// var_Items.FormatCell(h,0) = "(value format '') +  ' <fgcolor=808080>(default)'"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.FormatCell(h,0) = "(value format '') +  ' <fgcolor=808080>(default)'"]
	endwith
	h = var_Items.AddItem(100.27)
	// var_Items.FormatCell(h,0) = "(value format '|;') +  ' <fgcolor=808080>(decimal separator is <b>;</b>)'"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.FormatCell(h,0) = "(value format '|;') +  ' <fgcolor=808080>(decimal separator is <b>;</b>)'"]
	endwith
oGrid.EndUpdate()

681
Is it possible to display the numbers using 3 (three) digits

local h,oGrid,var_Column,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
// oGrid.Columns.Add("Def").Def(17) = 1
var_Column = oGrid.Columns.Add("Def")
with (oGrid)
	TemplateDef = [dim var_Column]
	TemplateDef = var_Column
	Template = [var_Column.Def(17) = 1]
endwith
var_Items = oGrid.Items
	h = var_Items.AddItem(100.27)
	// var_Items.FormatCell(h,0) = "(value format '') +  ' <fgcolor=808080>(default)'"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.FormatCell(h,0) = "(value format '') +  ' <fgcolor=808080>(default)'"]
	endwith
	h = var_Items.AddItem(100.27)
	// var_Items.FormatCell(h,0) = "(value format '3') +  ' <fgcolor=808080>(3 digits)'"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.FormatCell(h,0) = "(value format '3') +  ' <fgcolor=808080>(3 digits)'"]
	endwith
	h = var_Items.AddItem(100.27)
	// var_Items.FormatCell(h,0) = "(value format 2) +  '  <fgcolor=808080>(2 digits)'"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.FormatCell(h,0) = "(value format 2) +  '  <fgcolor=808080>(2 digits)'"]
	endwith
	h = var_Items.AddItem(100.27)
	// var_Items.FormatCell(h,0) = "(value format 1) +  ' <fgcolor=808080>(1 digit)'"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.FormatCell(h,0) = "(value format 1) +  ' <fgcolor=808080>(1 digit)'"]
	endwith
oGrid.EndUpdate()

680
Is there any option to show the tooltip programmatically

/*
with (this.EXGRIDACTIVEXCONTROL1.nativeObject)
	MouseMove = class::nativeObject_MouseMove
endwith
*/
// Occurs when the user moves the mouse.
function nativeObject_MouseMove(Button,Shift,X,Y)
	oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
	oGrid.ShowToolTip(Str(oGrid.ItemFromPoint(-1,-1,c,hit)),"","8","8")
return

local oGrid,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.Columns.Add("Def")
var_Items = oGrid.Items
	var_Items.AddItem("Item 1")
	var_Items.AddItem("Item 2")
	var_Items.AddItem("Item 3")
oGrid.EndUpdate()

679
How can I specify the column's width to be the same for all columns

local oGrid,var_Columns

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
var_Columns = oGrid.Columns
	var_Columns.Add("A")
	var_Columns.Add("B")
	var_Columns.Add("C")
oGrid.DrawGridLines = -1
oGrid.ColumnAutoResize = true

678
How can I set the column's width to my desired width

local oGrid,var_Column,var_Column1,var_Columns

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.ColumnAutoResize = false
var_Columns = oGrid.Columns
	// var_Columns.Add("A").Width = 128
	var_Column = var_Columns.Add("A")
	with (oGrid)
		TemplateDef = [dim var_Column]
		TemplateDef = var_Column
		Template = [var_Column.Width = 128]
	endwith
	// var_Columns.Add("B").Width = 128
	var_Column1 = var_Columns.Add("B")
	with (oGrid)
		TemplateDef = [dim var_Column1]
		TemplateDef = var_Column1
		Template = [var_Column1.Width = 128]
	endwith
oGrid.DrawGridLines = -1

677
Is it possible to format numbers

local h,h1,oGrid,var_Column,var_Column1,var_Column2,var_Column3,var_Columns,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.MarkSearchColumn = false
var_Columns = oGrid.Columns
	var_Columns.Add("Name")
	var_Column = var_Columns.Add("A")
		var_Column.SortType = 1
		var_Column.AllowSizing = false
		var_Column.Width = 36
		var_Column.FormatColumn = "len(value) ? value + ' +'"
		var_Column.Editor.EditType = 4
	var_Column1 = var_Columns.Add("B")
		var_Column1.SortType = 1
		var_Column1.AllowSizing = false
		var_Column1.Width = 36
		var_Column1.FormatColumn = "len(value) ? value + ' +'"
		var_Column1.Editor.EditType = 4
	var_Column2 = var_Columns.Add("C")
		var_Column2.SortType = 1
		var_Column2.AllowSizing = false
		var_Column2.Width = 36
		var_Column2.FormatColumn = "len(value) ? value + ' ='"
		var_Column2.Editor.EditType = 4
	var_Column3 = var_Columns.Add("A+B+C")
		var_Column3.SortType = 1
		var_Column3.Width = 64
		var_Column3.ComputedField = "dbl(%1)+dbl(%2)+dbl(%3)"
		var_Column3.FormatColumn = "type(value) in (0,1) ? 'null' : ( dbl(value)<0 ? '<fgcolor=FF0000>'+ (value format '2|.|3|,|1' ) : (dbl(value)>0 ? '<fgcolor=0000FF>+'+(value format '2|.|3|,' ): '0.00') )"
		// var_Column3.Def(17) = 1
		with (oGrid)
			TemplateDef = [dim var_Column3]
			TemplateDef = var_Column3
			Template = [var_Column3.Def(17) = 1]
		endwith
var_Items = oGrid.Items
	h = var_Items.AddItem("Root")
	// var_Items.CellValueFormat(h,4) = 2
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValueFormat(h,4) = 2]
	endwith
	h1 = var_Items.InsertItem(h,null,"Child 1")
	// var_Items.CellValue(h1,1) = 7
	with (oGrid)
		TemplateDef = [dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.CellValue(h1,1) = 7]
	endwith
	// var_Items.CellValue(h1,2) = 3
	with (oGrid)
		TemplateDef = [dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.CellValue(h1,2) = 3]
	endwith
	// var_Items.CellValue(h1,3) = 1
	with (oGrid)
		TemplateDef = [dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.CellValue(h1,3) = 1]
	endwith
	h1 = var_Items.InsertItem(h,null,"Child 2")
	// var_Items.CellValue(h1,1) = -2
	with (oGrid)
		TemplateDef = [dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.CellValue(h1,1) = -2]
	endwith
	// var_Items.CellValue(h1,2) = -2
	with (oGrid)
		TemplateDef = [dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.CellValue(h1,2) = -2]
	endwith
	// var_Items.CellValue(h1,3) = -4
	with (oGrid)
		TemplateDef = [dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.CellValue(h1,3) = -4]
	endwith
	h1 = var_Items.InsertItem(h,null,"Child 3")
	// var_Items.CellValue(h1,1) = 2
	with (oGrid)
		TemplateDef = [dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.CellValue(h1,1) = 2]
	endwith
	// var_Items.CellValue(h1,2) = 2
	with (oGrid)
		TemplateDef = [dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.CellValue(h1,2) = 2]
	endwith
	// var_Items.CellValue(h1,3) = -4
	with (oGrid)
		TemplateDef = [dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.CellValue(h1,3) = -4]
	endwith
	// var_Items.ExpandItem(h) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ExpandItem(h) = True]
	endwith
oGrid.EndUpdate()

676
How can I collapse all items

local h,oGrid,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.LinesAtRoot = -1
oGrid.Columns.Add("Items")
var_Items = oGrid.Items
	h = var_Items.AddItem("Root 1")
	var_Items.InsertItem(h,null,"Child 1")
	var_Items.InsertItem(h,null,"Child 2")
	h = var_Items.AddItem("Root 2")
	var_Items.InsertItem(h,null,"Child 1")
	var_Items.InsertItem(h,null,"Child 2")
	// var_Items.ExpandItem(0) = false
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.ExpandItem(0) = False]
	endwith
oGrid.EndUpdate()

675
How can I expand all items

local h,oGrid,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.LinesAtRoot = -1
oGrid.Columns.Add("Items")
var_Items = oGrid.Items
	h = var_Items.AddItem("Root 1")
	var_Items.InsertItem(h,null,"Child 1")
	var_Items.InsertItem(h,null,"Child 2")
	h = var_Items.AddItem("Root 2")
	var_Items.InsertItem(h,null,"Child 1")
	var_Items.InsertItem(h,null,"Child 2")
	// var_Items.ExpandItem(0) = true
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.ExpandItem(0) = True]
	endwith
oGrid.EndUpdate()

674
Can I display a total field without having to add a child item

local h,oGrid,var_Column,var_Editor,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
var_Column = oGrid.Columns.Add("Numbers")
	var_Column.SortType = 1
	var_Editor = var_Column.Editor
		var_Editor.EditType = 4
		var_Editor.Numeric = 1
var_Items = oGrid.Items
	var_Items.AddItem(1)
	var_Items.AddItem(2)
	var_Items.AddItem(3)
	var_Items.AddItem(4)
	// var_Items.LockedItemCount(2) = 1
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.LockedItemCount(2) = 1]
	endwith
	h = var_Items.LockedItem(2,0)
	// var_Items.CellValue(h,0) = "sum(all,dir,dbl(%0))"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValue(h,0) = "sum(all,dir,dbl(%0))"]
	endwith
	// var_Items.SortableItem(h) = false
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.SortableItem(h) = False]
	endwith
	// var_Items.CellValueFormat(h,0) = 4
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValueFormat(h,0) = 4]
	endwith
	// var_Items.CellHAlignment(h,0) = 2
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellHAlignment(h,0) = 2]
	endwith
	// var_Items.FormatCell(h,0) = "'SUM: '+value"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.FormatCell(h,0) = "'SUM: '+value"]
	endwith
oGrid.EndUpdate()

673
Can I display the number of child items

local h,hx,oGrid,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.LinesAtRoot = 1
oGrid.Columns.Add("")
var_Items = oGrid.Items
	h = var_Items.AddItem("Root 1")
	hx = var_Items.SplitCell(h,0)
	// var_Items.CellValue(0,hx) = "count(current,dir,1)"
	with (oGrid)
		TemplateDef = [dim var_Items,hx]
		TemplateDef = var_Items
		TemplateDef = hx
		Template = [var_Items.CellValue(0,hx) = "count(current,dir,1)"]
	endwith
	// var_Items.CellValueFormat(0,hx) = 4
	with (oGrid)
		TemplateDef = [dim var_Items,hx]
		TemplateDef = var_Items
		TemplateDef = hx
		Template = [var_Items.CellValueFormat(0,hx) = 4]
	endwith
	// var_Items.FormatCell(0,hx) = "'Childs: ' + value"
	with (oGrid)
		TemplateDef = [dim var_Items,hx]
		TemplateDef = var_Items
		TemplateDef = hx
		Template = [var_Items.FormatCell(0,hx) = "'Childs: ' + value"]
	endwith
	var_Items.InsertItem(h,null,"Child 1")
	var_Items.InsertItem(h,null,"Child 2")
	// var_Items.ExpandItem(h) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ExpandItem(h) = True]
	endwith
	h = var_Items.AddItem("Root 2")
	hx = var_Items.SplitCell(h,0)
	// var_Items.CellValue(0,hx) = "count(current,dir,1)"
	with (oGrid)
		TemplateDef = [dim var_Items,hx]
		TemplateDef = var_Items
		TemplateDef = hx
		Template = [var_Items.CellValue(0,hx) = "count(current,dir,1)"]
	endwith
	// var_Items.CellValueFormat(0,hx) = 4
	with (oGrid)
		TemplateDef = [dim var_Items,hx]
		TemplateDef = var_Items
		TemplateDef = hx
		Template = [var_Items.CellValueFormat(0,hx) = 4]
	endwith
	// var_Items.FormatCell(0,hx) = "'Childs: ' + value"
	with (oGrid)
		TemplateDef = [dim var_Items,hx]
		TemplateDef = var_Items
		TemplateDef = hx
		Template = [var_Items.FormatCell(0,hx) = "'Childs: ' + value"]
	endwith
	var_Items.InsertItem(h,null,"Child 1")
	var_Items.InsertItem(h,null,"Child 2")
	var_Items.InsertItem(h,null,"Child 3")
	var_Items.InsertItem(h,null,"Child 4")
oGrid.EndUpdate()

672
My field does not display the correctly computed value if I enter data using the control's editors ( concatenation of strings ). What am I doing wrong

local h,oGrid,var_Editor,var_Editor1,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.Columns.Add("T")
var_Editor = oGrid.Columns.Add("A").Editor
	var_Editor.Numeric = true
	var_Editor.EditType = 4
var_Editor1 = oGrid.Columns.Add("B").Editor
	var_Editor1.Numeric = true
	var_Editor1.EditType = 4
oGrid.Columns.Add("A+B")
var_Items = oGrid.Items
	h = var_Items.AddItem("Incorrect")
	// var_Items.CellToolTip(h,0) = "Just type a number in the column A or B. The result will be concaternated"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellToolTip(h,0) = "Just type a number in the column A or B. The result will be concaternated"]
	endwith
	// var_Items.CellValue(h,1) = "10"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValue(h,1) = "10"]
	endwith
	// var_Items.CellValue(h,2) = "20"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValue(h,2) = "20"]
	endwith
	// var_Items.CellValue(h,3) = "currency(%1+%2)"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValue(h,3) = "currency(%1+%2)"]
	endwith
	// var_Items.CellValueFormat(h,3) = 2
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValueFormat(h,3) = 2]
	endwith
	h = var_Items.AddItem("Correct")
	// var_Items.CellValue(h,1) = 10
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValue(h,1) = 10]
	endwith
	// var_Items.CellValue(h,2) = 20
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValue(h,2) = 20]
	endwith
	// var_Items.CellValue(h,3) = "currency(dbl(%1)+dbl(%2))"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValue(h,3) = "currency(dbl(%1)+dbl(%2))"]
	endwith
	// var_Items.CellValueFormat(h,3) = 2
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValueFormat(h,3) = 2]
	endwith
oGrid.EndUpdate()

671
The CellValue/CellCaption property gets the result of a computed/total field with text formatting. Is it possible to get that value without text formatting

local h,oGrid,var_Editor,var_Editor1,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
// oGrid.Columns.Add("A").Editor.EditType = 4
var_Editor = oGrid.Columns.Add("A").Editor
with (oGrid)
	TemplateDef = [dim var_Editor]
	TemplateDef = var_Editor
	Template = [var_Editor.EditType = 4]
endwith
// oGrid.Columns.Add("B").Editor.EditType = 4
var_Editor1 = oGrid.Columns.Add("B").Editor
with (oGrid)
	TemplateDef = [dim var_Editor1]
	TemplateDef = var_Editor1
	Template = [var_Editor1.EditType = 4]
endwith
oGrid.Columns.Add("A+B")
var_Items = oGrid.Items
	h = var_Items.AddItem(10)
	// var_Items.CellValue(h,1) = 20
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValue(h,1) = 20]
	endwith
	// var_Items.CellValueFormat(h,2) = 2
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValueFormat(h,2) = 2]
	endwith
	// var_Items.CellValue(h,2) = "currency(dbl(%0)+dbl(%1))"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValue(h,2) = "currency(dbl(%0)+dbl(%1))"]
	endwith
	? "CellCaption returns " 
	? var_Items.CellCaption(h,2) 
	? "CellValue returns " 
	? Str(var_Items.CellValue(h,2)) 
	? "ComputeValue returns " 
	? Str(var_Items.ComputeValue("dbl(%0)+dbl(%1)",h,0,var_Items.CellValueFormat(h,2))) 
oGrid.EndUpdate()

670
Can I get the result of a specified formula as your control does using the ComputedField property
local h,oGrid,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.Columns.Add("A")
oGrid.Columns.Add("B")
var_Items = oGrid.Items
	h = var_Items.AddItem(10)
	// var_Items.CellValue(h,1) = 20
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValue(h,1) = 20]
	endwith
	? "A+B is " 
	? Str(var_Items.ComputeValue("dbl(%0)+dbl(%1)",h,0,2)) 
oGrid.EndUpdate()

669
Is it possible to get the text without HTML formatting

local h,oGrid,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.Columns.Add("")
var_Items = oGrid.Items
	h = var_Items.AddItem("<b>bold</b>")
	? Str(var_Items.ComputeValue(var_Items.CellValue(h,0),h,0,1)) 
oGrid.EndUpdate()

668
Can I specify an item to be a separator

local h,oGrid,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.TreeColumnIndex = -1
oGrid.SortOnClick = 0
oGrid.Columns.Add("Numbers")
var_Items = oGrid.Items
	var_Items.AddItem(1)
	var_Items.AddItem(2)
	h = var_Items.AddItem("separator")
	// var_Items.SelectableItem(h) = false
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.SelectableItem(h) = False]
	endwith
	// var_Items.ItemDivider(h) = 0
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ItemDivider(h) = 0]
	endwith
	// var_Items.ItemDividerLineAlignment(h) = 1
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ItemDividerLineAlignment(h) = 1]
	endwith
	// var_Items.ItemDividerLine(h) = 5
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ItemDividerLine(h) = 5]
	endwith
	// var_Items.CellHAlignment(h,0) = 1
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellHAlignment(h,0) = 1]
	endwith
	var_Items.AddItem(3)
	var_Items.AddItem(4)
oGrid.EndUpdate()

667
How can I count only non-zero values

local h,oGrid,var_Column,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
// oGrid.Columns.Add("Numbers").SortType = 1
var_Column = oGrid.Columns.Add("Numbers")
with (oGrid)
	TemplateDef = [dim var_Column]
	TemplateDef = var_Column
	Template = [var_Column.SortType = 1]
endwith
var_Items = oGrid.Items
	var_Items.AddItem(1)
	var_Items.AddItem(2)
	var_Items.AddItem(0)
	var_Items.AddItem(0)
	var_Items.AddItem(0)
	var_Items.AddItem(0)
	var_Items.AddItem(3)
	var_Items.AddItem(4)
	h = var_Items.AddItem("sum(all,dir,dbl(%0)?1:0)")
	// var_Items.SortableItem(h) = false
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.SortableItem(h) = False]
	endwith
	// var_Items.CellValueFormat(h,0) = 4
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValueFormat(h,0) = 4]
	endwith
	// var_Items.CellHAlignment(h,0) = 2
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellHAlignment(h,0) = 2]
	endwith
	// var_Items.FormatCell(h,0) = "'COUNT non-zero: '+value"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.FormatCell(h,0) = "'COUNT non-zero: '+value"]
	endwith
oGrid.EndUpdate()

666
How can I add a AVG ( average ) field

local h,oGrid,var_Column,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
// oGrid.Columns.Add("Numbers").SortType = 1
var_Column = oGrid.Columns.Add("Numbers")
with (oGrid)
	TemplateDef = [dim var_Column]
	TemplateDef = var_Column
	Template = [var_Column.SortType = 1]
endwith
var_Items = oGrid.Items
	var_Items.AddItem(1)
	var_Items.AddItem(2)
	var_Items.AddItem(3)
	var_Items.AddItem(4)
	h = var_Items.AddItem("avg(all,dir,dbl(%0))")
	// var_Items.SortableItem(h) = false
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.SortableItem(h) = False]
	endwith
	// var_Items.CellValueFormat(h,0) = 4
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValueFormat(h,0) = 4]
	endwith
	// var_Items.CellHAlignment(h,0) = 2
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellHAlignment(h,0) = 2]
	endwith
	// var_Items.FormatCell(h,0) = "'AVG: '+value"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.FormatCell(h,0) = "'AVG: '+value"]
	endwith
oGrid.EndUpdate()

665
How can I add a COUNT field

local h,oGrid,var_Column,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
// oGrid.Columns.Add("Numbers").SortType = 1
var_Column = oGrid.Columns.Add("Numbers")
with (oGrid)
	TemplateDef = [dim var_Column]
	TemplateDef = var_Column
	Template = [var_Column.SortType = 1]
endwith
var_Items = oGrid.Items
	var_Items.AddItem(1)
	var_Items.AddItem(2)
	var_Items.AddItem(3)
	var_Items.AddItem(4)
	h = var_Items.AddItem("count(all,dir,0)")
	// var_Items.SortableItem(h) = false
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.SortableItem(h) = False]
	endwith
	// var_Items.CellValueFormat(h,0) = 4
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValueFormat(h,0) = 4]
	endwith
	// var_Items.CellHAlignment(h,0) = 2
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellHAlignment(h,0) = 2]
	endwith
	// var_Items.FormatCell(h,0) = "'COUNT: '+value"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.FormatCell(h,0) = "'COUNT: '+value"]
	endwith
oGrid.EndUpdate()

664
How can I add a MAX field

local h,oGrid,var_Column,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
// oGrid.Columns.Add("Numbers").SortType = 1
var_Column = oGrid.Columns.Add("Numbers")
with (oGrid)
	TemplateDef = [dim var_Column]
	TemplateDef = var_Column
	Template = [var_Column.SortType = 1]
endwith
var_Items = oGrid.Items
	var_Items.AddItem(1)
	var_Items.AddItem(2)
	var_Items.AddItem(3)
	var_Items.AddItem(4)
	h = var_Items.AddItem("max(all,dir,dbl(%0))")
	// var_Items.SortableItem(h) = false
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.SortableItem(h) = False]
	endwith
	// var_Items.CellValueFormat(h,0) = 4
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValueFormat(h,0) = 4]
	endwith
	// var_Items.CellHAlignment(h,0) = 2
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellHAlignment(h,0) = 2]
	endwith
	// var_Items.FormatCell(h,0) = "'MAX: '+value"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.FormatCell(h,0) = "'MAX: '+value"]
	endwith
oGrid.EndUpdate()

663
How can I add a MIN or MAX field (for numbers)

local h,oGrid,var_Column,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
// oGrid.Columns.Add("Numbers").SortType = 1
var_Column = oGrid.Columns.Add("Numbers")
with (oGrid)
	TemplateDef = [dim var_Column]
	TemplateDef = var_Column
	Template = [var_Column.SortType = 1]
endwith
var_Items = oGrid.Items
	var_Items.AddItem(11)
	var_Items.AddItem(21)
	var_Items.AddItem(3)
	var_Items.AddItem(4)
	h = var_Items.AddItem("min(all,dir,dbl(%0))")
	// var_Items.SortableItem(h) = false
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.SortableItem(h) = False]
	endwith
	// var_Items.CellValueFormat(h,0) = 4
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValueFormat(h,0) = 4]
	endwith
	// var_Items.CellHAlignment(h,0) = 2
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellHAlignment(h,0) = 2]
	endwith
	// var_Items.FormatCell(h,0) = "'MIN: '+value"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.FormatCell(h,0) = "'MIN: '+value"]
	endwith
	h = var_Items.AddItem("max(all,dir,dbl(%0))")
	// var_Items.SortableItem(h) = false
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.SortableItem(h) = False]
	endwith
	// var_Items.CellValueFormat(h,0) = 4
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValueFormat(h,0) = 4]
	endwith
	// var_Items.CellHAlignment(h,0) = 2
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellHAlignment(h,0) = 2]
	endwith
	// var_Items.FormatCell(h,0) = "'MAX: '+value"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.FormatCell(h,0) = "'MAX: '+value"]
	endwith
oGrid.EndUpdate()

662
How can I add a SUM field

local h,oGrid,var_Column,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
// oGrid.Columns.Add("Numbers").SortType = 1
var_Column = oGrid.Columns.Add("Numbers")
with (oGrid)
	TemplateDef = [dim var_Column]
	TemplateDef = var_Column
	Template = [var_Column.SortType = 1]
endwith
var_Items = oGrid.Items
	var_Items.AddItem(1)
	var_Items.AddItem(2)
	var_Items.AddItem(3)
	var_Items.AddItem(4)
	h = var_Items.AddItem("sum(all,dir,dbl(%0))")
	// var_Items.SortableItem(h) = false
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.SortableItem(h) = False]
	endwith
	// var_Items.CellValueFormat(h,0) = 4
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValueFormat(h,0) = 4]
	endwith
	// var_Items.CellHAlignment(h,0) = 2
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellHAlignment(h,0) = 2]
	endwith
	// var_Items.FormatCell(h,0) = "'SUM: '+value"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.FormatCell(h,0) = "'SUM: '+value"]
	endwith
oGrid.EndUpdate()

661
How can I add total and subtotals fields

/*
with (this.EXGRIDACTIVEXCONTROL1.nativeObject)
	Change = class::nativeObject_Change
endwith
*/
// Occurs when the user changes the cell's content.
function nativeObject_Change(Item,ColIndex,NewValue)
	oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
	oGrid.Refresh()
return

local h,oGrid,var_Column,var_Editor,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.LinesAtRoot = 1
oGrid.Columns.Add("Members")
var_Column = oGrid.Columns.Add("Values")
	var_Column.FormatColumn = "currency(value)"
	var_Editor = var_Column.Editor
		var_Editor.EditType = 4
		var_Editor.Numeric = true
var_Items = oGrid.Items
	h = var_Items.AddItem("Group 1")
	// var_Items.ItemBold(h) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ItemBold(h) = True]
	endwith
	// var_Items.CellEditorVisible(h,1) = false
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellEditorVisible(h,1) = False]
	endwith
	// var_Items.CellValue(h,1) = "sum(current,dir,dbl(%1))"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValue(h,1) = "sum(current,dir,dbl(%1))"]
	endwith
	// var_Items.CellValueFormat(h,1) = 5 /*exTotalField | exHTML*/
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValueFormat(h,1) = 5]
	endwith
	// var_Items.CellHAlignment(h,1) = 2
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellHAlignment(h,1) = 2]
	endwith
	// var_Items.CellValue(var_Items.InsertItem(h,null,"Child 1"),1) = 10
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(InsertItem(h,,"Child 1"),1) = 10]
	endwith
	// var_Items.CellValue(var_Items.InsertItem(h,null,"Child 2"),1) = 20
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(InsertItem(h,,"Child 2"),1) = 20]
	endwith
	// var_Items.CellValue(var_Items.InsertItem(h,null,"Child 3"),1) = 30
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(InsertItem(h,,"Child 3"),1) = 30]
	endwith
	// var_Items.ExpandItem(h) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ExpandItem(h) = True]
	endwith
	h = var_Items.AddItem("Group 2")
	// var_Items.ItemBold(h) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ItemBold(h) = True]
	endwith
	// var_Items.CellEditorVisible(h,1) = false
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellEditorVisible(h,1) = False]
	endwith
	// var_Items.CellValue(h,1) = "sum(current,dir,dbl(%1))"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValue(h,1) = "sum(current,dir,dbl(%1))"]
	endwith
	// var_Items.CellValueFormat(h,1) = 5 /*exTotalField | exHTML*/
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValueFormat(h,1) = 5]
	endwith
	// var_Items.CellHAlignment(h,1) = 2
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellHAlignment(h,1) = 2]
	endwith
	// var_Items.CellValue(var_Items.InsertItem(h,null,"Child 1"),1) = 5
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(InsertItem(h,,"Child 1"),1) = 5]
	endwith
	// var_Items.CellValue(var_Items.InsertItem(h,null,"Child 2"),1) = 15
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(InsertItem(h,,"Child 2"),1) = 15]
	endwith
	// var_Items.CellValue(var_Items.InsertItem(h,null,"Child 3"),1) = 35
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(InsertItem(h,,"Child 3"),1) = 35]
	endwith
	h = var_Items.AddItem("total")
	// var_Items.CellValue(h,1) = "sum(all,rec,dbl(%1))"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValue(h,1) = "sum(all,rec,dbl(%1))"]
	endwith
	// var_Items.CellValueFormat(h,1) = 5 /*exTotalField | exHTML*/
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValueFormat(h,1) = 5]
	endwith
	// var_Items.CellEditorVisible(h,1) = false
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellEditorVisible(h,1) = False]
	endwith
	// var_Items.FormatCell(h,1) = "'Total: <b>' + currency(value)"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.FormatCell(h,1) = "'Total: <b>' + currency(value)"]
	endwith
	// var_Items.CellHAlignment(h,1) = 2
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellHAlignment(h,1) = 2]
	endwith
	// var_Items.ItemDivider(h) = 1
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ItemDivider(h) = 1]
	endwith
	// var_Items.ItemDividerLineAlignment(h) = 1
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ItemDividerLineAlignment(h) = 1]
	endwith
	// var_Items.ItemDividerLine(h) = 2
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ItemDividerLine(h) = 2]
	endwith
	// var_Items.SortableItem(h) = false
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.SortableItem(h) = False]
	endwith
oGrid.EndUpdate()

660
Is is possible to have subtotal items, and a grand total item

/*
with (this.EXGRIDACTIVEXCONTROL1.nativeObject)
	Change = class::nativeObject_Change
endwith
*/
// Occurs when the user changes the cell's content.
function nativeObject_Change(Item,ColIndex,NewValue)
	oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
	oGrid.Refresh()
return

local h,hT,oGrid,var_Column,var_Editor,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.BackColor = 0xffffff
oGrid.LinesAtRoot = 1
oGrid.ShowFocusRect = false
oGrid.Columns.Add("Members")
var_Column = oGrid.Columns.Add("Values")
	var_Column.FormatColumn = "currency(value)"
	var_Editor = var_Column.Editor
		var_Editor.EditType = 4
		var_Editor.Numeric = true
var_Items = oGrid.Items
	h = var_Items.AddItem("Group 1")
	// var_Items.ItemBold(h) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ItemBold(h) = True]
	endwith
	// var_Items.SortableItem(h) = false
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.SortableItem(h) = False]
	endwith
	// var_Items.CellEditorVisible(h,1) = false
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellEditorVisible(h,1) = False]
	endwith
	// var_Items.FormatCell(h,1) = " "
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.FormatCell(h,1) = " "]
	endwith
	// var_Items.CellValue(var_Items.InsertItem(h,null,"Child 1"),1) = 10
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(InsertItem(h,,"Child 1"),1) = 10]
	endwith
	// var_Items.CellValue(var_Items.InsertItem(h,null,"Child 2"),1) = 20
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(InsertItem(h,,"Child 2"),1) = 20]
	endwith
	// var_Items.CellValue(var_Items.InsertItem(h,null,"Child 3"),1) = 30
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(InsertItem(h,,"Child 3"),1) = 30]
	endwith
	hT = var_Items.InsertItem(h,null,"subtotal")
	// var_Items.CellHAlignment(hT,1) = 2
	with (oGrid)
		TemplateDef = [dim var_Items,hT]
		TemplateDef = var_Items
		TemplateDef = hT
		Template = [var_Items.CellHAlignment(hT,1) = 2]
	endwith
	// var_Items.CellEditorVisible(hT,1) = false
	with (oGrid)
		TemplateDef = [dim var_Items,hT]
		TemplateDef = var_Items
		TemplateDef = hT
		Template = [var_Items.CellEditorVisible(hT,1) = False]
	endwith
	// var_Items.CellValue(hT,1) = "sum(parent,dir,dbl(%1))"
	with (oGrid)
		TemplateDef = [dim var_Items,hT]
		TemplateDef = var_Items
		TemplateDef = hT
		Template = [var_Items.CellValue(hT,1) = "sum(parent,dir,dbl(%1))"]
	endwith
	// var_Items.CellValueFormat(hT,1) = 5 /*exTotalField | exHTML*/
	with (oGrid)
		TemplateDef = [dim var_Items,hT]
		TemplateDef = var_Items
		TemplateDef = hT
		Template = [var_Items.CellValueFormat(hT,1) = 5]
	endwith
	// var_Items.FormatCell(hT,1) = "'subtotal: <b>' + currency(value)"
	with (oGrid)
		TemplateDef = [dim var_Items,hT]
		TemplateDef = var_Items
		TemplateDef = hT
		Template = [var_Items.FormatCell(hT,1) = "'subtotal: <b>' + currency(value)"]
	endwith
	// var_Items.ItemDivider(hT) = 1
	with (oGrid)
		TemplateDef = [dim var_Items,hT]
		TemplateDef = var_Items
		TemplateDef = hT
		Template = [var_Items.ItemDivider(hT) = 1]
	endwith
	// var_Items.ItemDividerLineAlignment(hT) = 1
	with (oGrid)
		TemplateDef = [dim var_Items,hT]
		TemplateDef = var_Items
		TemplateDef = hT
		Template = [var_Items.ItemDividerLineAlignment(hT) = 1]
	endwith
	// var_Items.SortableItem(hT) = false
	with (oGrid)
		TemplateDef = [dim var_Items,hT]
		TemplateDef = var_Items
		TemplateDef = hT
		Template = [var_Items.SortableItem(hT) = False]
	endwith
	// var_Items.SelectableItem(hT) = false
	with (oGrid)
		TemplateDef = [dim var_Items,hT]
		TemplateDef = var_Items
		TemplateDef = hT
		Template = [var_Items.SelectableItem(hT) = False]
	endwith
	// var_Items.ItemDividerLine(hT) = 3
	with (oGrid)
		TemplateDef = [dim var_Items,hT]
		TemplateDef = var_Items
		TemplateDef = hT
		Template = [var_Items.ItemDividerLine(hT) = 3]
	endwith
	// var_Items.ExpandItem(h) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ExpandItem(h) = True]
	endwith
	h = var_Items.AddItem("Group 2")
	// var_Items.ItemBold(h) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ItemBold(h) = True]
	endwith
	// var_Items.SortableItem(h) = false
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.SortableItem(h) = False]
	endwith
	// var_Items.FormatCell(h,1) = " "
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.FormatCell(h,1) = " "]
	endwith
	// var_Items.CellEditorVisible(h,1) = false
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellEditorVisible(h,1) = False]
	endwith
	// var_Items.CellValue(var_Items.InsertItem(h,null,"Child 1"),1) = 15
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(InsertItem(h,,"Child 1"),1) = 15]
	endwith
	// var_Items.CellValue(var_Items.InsertItem(h,null,"Child 2"),1) = 25
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(InsertItem(h,,"Child 2"),1) = 25]
	endwith
	// var_Items.CellValue(var_Items.InsertItem(h,null,"Child 3"),1) = 18
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(InsertItem(h,,"Child 3"),1) = 18]
	endwith
	hT = var_Items.InsertItem(h,null,"subtotal")
	// var_Items.CellHAlignment(hT,1) = 2
	with (oGrid)
		TemplateDef = [dim var_Items,hT]
		TemplateDef = var_Items
		TemplateDef = hT
		Template = [var_Items.CellHAlignment(hT,1) = 2]
	endwith
	// var_Items.CellEditorVisible(hT,1) = false
	with (oGrid)
		TemplateDef = [dim var_Items,hT]
		TemplateDef = var_Items
		TemplateDef = hT
		Template = [var_Items.CellEditorVisible(hT,1) = False]
	endwith
	// var_Items.CellValue(hT,1) = "sum(parent,dir,dbl(%1))"
	with (oGrid)
		TemplateDef = [dim var_Items,hT]
		TemplateDef = var_Items
		TemplateDef = hT
		Template = [var_Items.CellValue(hT,1) = "sum(parent,dir,dbl(%1))"]
	endwith
	// var_Items.CellValueFormat(hT,1) = 5 /*exTotalField | exHTML*/
	with (oGrid)
		TemplateDef = [dim var_Items,hT]
		TemplateDef = var_Items
		TemplateDef = hT
		Template = [var_Items.CellValueFormat(hT,1) = 5]
	endwith
	// var_Items.FormatCell(hT,1) = "'subtotal: <b>' + currency(value)"
	with (oGrid)
		TemplateDef = [dim var_Items,hT]
		TemplateDef = var_Items
		TemplateDef = hT
		Template = [var_Items.FormatCell(hT,1) = "'subtotal: <b>' + currency(value)"]
	endwith
	// var_Items.ItemDivider(hT) = 1
	with (oGrid)
		TemplateDef = [dim var_Items,hT]
		TemplateDef = var_Items
		TemplateDef = hT
		Template = [var_Items.ItemDivider(hT) = 1]
	endwith
	// var_Items.ItemDividerLineAlignment(hT) = 1
	with (oGrid)
		TemplateDef = [dim var_Items,hT]
		TemplateDef = var_Items
		TemplateDef = hT
		Template = [var_Items.ItemDividerLineAlignment(hT) = 1]
	endwith
	// var_Items.ItemDividerLine(hT) = 3
	with (oGrid)
		TemplateDef = [dim var_Items,hT]
		TemplateDef = var_Items
		TemplateDef = hT
		Template = [var_Items.ItemDividerLine(hT) = 3]
	endwith
	// var_Items.SortableItem(hT) = false
	with (oGrid)
		TemplateDef = [dim var_Items,hT]
		TemplateDef = var_Items
		TemplateDef = hT
		Template = [var_Items.SortableItem(hT) = False]
	endwith
	// var_Items.SelectableItem(hT) = false
	with (oGrid)
		TemplateDef = [dim var_Items,hT]
		TemplateDef = var_Items
		TemplateDef = hT
		Template = [var_Items.SelectableItem(hT) = False]
	endwith
	// var_Items.ExpandItem(h) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ExpandItem(h) = True]
	endwith
	h = var_Items.AddItem("total")
	// var_Items.CellValue(h,1) = "sum(all,rec,dbl(%1))"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValue(h,1) = "sum(all,rec,dbl(%1))"]
	endwith
	// var_Items.CellValueFormat(h,1) = 5 /*exTotalField | exHTML*/
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValueFormat(h,1) = 5]
	endwith
	// var_Items.CellEditorVisible(h,1) = false
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellEditorVisible(h,1) = False]
	endwith
	// var_Items.FormatCell(h,1) = "'Total: <b><font ;11>' + currency(value)"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.FormatCell(h,1) = "'Total: <b><font ;11>' + currency(value)"]
	endwith
	// var_Items.CellHAlignment(h,1) = 1
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellHAlignment(h,1) = 1]
	endwith
	// var_Items.ItemDivider(h) = 1
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ItemDivider(h) = 1]
	endwith
	// var_Items.ItemDividerLineAlignment(h) = 1
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ItemDividerLineAlignment(h) = 1]
	endwith
	// var_Items.ItemDividerLine(h) = 2
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ItemDividerLine(h) = 2]
	endwith
	// var_Items.SortableItem(h) = false
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.SortableItem(h) = False]
	endwith
	// var_Items.SelectableItem(h) = false
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.SelectableItem(h) = False]
	endwith
oGrid.EndUpdate()

659
Is it possible to have a total field for each column

/*
with (this.EXGRIDACTIVEXCONTROL1.nativeObject)
	Change = class::nativeObject_Change
endwith
*/
// Occurs when the user changes the cell's content.
function nativeObject_Change(Item,ColIndex,NewValue)
	oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
	oGrid.Refresh()
return

local h,oGrid,var_Column,var_Column1,var_Editor,var_Editor1,var_Items,var_Items1

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
var_Column = oGrid.Columns.Add("C1")
	var_Editor = var_Column.Editor
		var_Editor.Numeric = -1
		var_Editor.EditType = 4
	var_Column.SortType = 1
var_Column1 = oGrid.Columns.Add("C2")
	var_Editor1 = var_Column1.Editor
		var_Editor1.Numeric = -1
		var_Editor1.EditType = 4
	var_Column1.SortType = 1
var_Items = oGrid.Items
	// var_Items.LockedItemCount(2) = 1
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.LockedItemCount(2) = 1]
	endwith
	h = var_Items.LockedItem(2,0)
	// var_Items.ItemBackColor(h) = 0xf0f0f0
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ItemBackColor(h) = 15790320]
	endwith
	// var_Items.ItemBold(h) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ItemBold(h) = True]
	endwith
	// var_Items.CellValue(h,0) = "sum(all,dir,dbl(%0))"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValue(h,0) = "sum(all,dir,dbl(%0))"]
	endwith
	// var_Items.CellValueFormat(h,0) = 4
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValueFormat(h,0) = 4]
	endwith
	// var_Items.CellValue(h,1) = "sum(all,dir,dbl(%1))"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValue(h,1) = "sum(all,dir,dbl(%1))"]
	endwith
	// var_Items.CellValueFormat(h,1) = 4
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValueFormat(h,1) = 4]
	endwith
var_Items1 = oGrid.Items
	// var_Items1.CellValue(var_Items1.AddItem(10),1) = 12
	with (oGrid)
		TemplateDef = [dim var_Items1]
		TemplateDef = var_Items1
		Template = [var_Items1.CellValue(AddItem(10),1) = 12]
	endwith
	// var_Items1.CellValue(var_Items1.AddItem(25),1) = 5
	with (oGrid)
		TemplateDef = [dim var_Items1]
		TemplateDef = var_Items1
		Template = [var_Items1.CellValue(AddItem(25),1) = 5]
	endwith
	// var_Items1.CellValue(var_Items1.AddItem(31),1) = 17
	with (oGrid)
		TemplateDef = [dim var_Items1]
		TemplateDef = var_Items1
		Template = [var_Items1.CellValue(AddItem(31),1) = 17]
	endwith
	// var_Items1.CellValue(var_Items1.AddItem(48),1) = 22
	with (oGrid)
		TemplateDef = [dim var_Items1]
		TemplateDef = var_Items1
		Template = [var_Items1.CellValue(AddItem(48),1) = 22]
	endwith
oGrid.EndUpdate()

658
How can I add a total field for a DataSource being used

/*
with (this.EXGRIDACTIVEXCONTROL1.nativeObject)
	Change = class::nativeObject_Change
endwith
*/
// Occurs when the user changes the cell's content.
function nativeObject_Change(Item,ColIndex,NewValue)
	oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
	oGrid.Refresh()
return

local h,oGrid,rs,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.ColumnAutoResize = false
oGrid.ContinueColumnScroll = false
rs = new OleAutoClient("ADOR.Recordset")
	rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3)
oGrid.DataSource = rs
var_Items = oGrid.Items
	// var_Items.LockedItemCount(0) = 1
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.LockedItemCount(0) = 1]
	endwith
	h = var_Items.LockedItem(0,0)
	// var_Items.ItemDivider(h) = 0
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ItemDivider(h) = 0]
	endwith
	// var_Items.CellValueFormat(h,0) = 5 /*exTotalField | exHTML*/
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValueFormat(h,0) = 5]
	endwith
	// var_Items.CellValue(h,0) = "sum(all,dir,%1)"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValue(h,0) = "sum(all,dir,%1)"]
	endwith

657
How can I add a total field

/*
with (this.EXGRIDACTIVEXCONTROL1.nativeObject)
	Change = class::nativeObject_Change
endwith
*/
// Occurs when the user changes the cell's content.
function nativeObject_Change(Item,ColIndex,NewValue)
	oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
	oGrid.Refresh()
return

local h,oGrid,var_Column,var_Editor,var_Items,var_Items1

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
var_Column = oGrid.Columns.Add("Numbers")
	var_Editor = var_Column.Editor
		var_Editor.Numeric = -1
		var_Editor.EditType = 4
	var_Column.SortType = 1
var_Items = oGrid.Items
	// var_Items.LockedItemCount(0) = 1
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.LockedItemCount(0) = 1]
	endwith
	h = var_Items.LockedItem(0,0)
	// var_Items.ItemBackColor(h) = 0xf0f0f0
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ItemBackColor(h) = 15790320]
	endwith
	// var_Items.CellValue(h,0) = "sum(all,dir,dbl(%0))"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValue(h,0) = "sum(all,dir,dbl(%0))"]
	endwith
	// var_Items.CellValueFormat(h,0) = 4
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValueFormat(h,0) = 4]
	endwith
	// var_Items.CellHAlignment(h,0) = 2
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellHAlignment(h,0) = 2]
	endwith
	// var_Items.FormatCell(h,0) = "'Total: '+value"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.FormatCell(h,0) = "'Total: '+value"]
	endwith
var_Items1 = oGrid.Items
	var_Items1.AddItem(10)
	var_Items1.AddItem(25)
	var_Items1.AddItem(31)
	var_Items1.AddItem(48)
oGrid.EndUpdate()

656
How can I add a total field

/*
with (this.EXGRIDACTIVEXCONTROL1.nativeObject)
	Change = class::nativeObject_Change
endwith
*/
// Occurs when the user changes the cell's content.
function nativeObject_Change(Item,ColIndex,NewValue)
	oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
	oGrid.Refresh()
return

local h,hT,oGrid,var_Editor,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
var_Editor = oGrid.Columns.Add("Items").Editor
	var_Editor.EditType = 4
	var_Editor.Numeric = true
var_Items = oGrid.Items
	h = var_Items.AddItem("Group 1")
	// var_Items.CellEditorVisible(h,0) = false
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellEditorVisible(h,0) = False]
	endwith
	var_Items.InsertItem(h,null,10)
	var_Items.InsertItem(h,null,20)
	var_Items.InsertItem(h,null,30)
	hT = var_Items.InsertItem(h,null,"sum(parent,dir,dbl(%0))")
	// var_Items.CellEditorVisible(hT,0) = false
	with (oGrid)
		TemplateDef = [dim var_Items,hT]
		TemplateDef = var_Items
		TemplateDef = hT
		Template = [var_Items.CellEditorVisible(hT,0) = False]
	endwith
	// var_Items.CellValueFormat(hT,0) = 5 /*exTotalField | exHTML*/
	with (oGrid)
		TemplateDef = [dim var_Items,hT]
		TemplateDef = var_Items
		TemplateDef = hT
		Template = [var_Items.CellValueFormat(hT,0) = 5]
	endwith
	// var_Items.ItemDivider(hT) = 0
	with (oGrid)
		TemplateDef = [dim var_Items,hT]
		TemplateDef = var_Items
		TemplateDef = hT
		Template = [var_Items.ItemDivider(hT) = 0]
	endwith
	// var_Items.ItemDividerLineAlignment(hT) = 2
	with (oGrid)
		TemplateDef = [dim var_Items,hT]
		TemplateDef = var_Items
		TemplateDef = hT
		Template = [var_Items.ItemDividerLineAlignment(hT) = 2]
	endwith
	// var_Items.SelectableItem(hT) = false
	with (oGrid)
		TemplateDef = [dim var_Items,hT]
		TemplateDef = var_Items
		TemplateDef = hT
		Template = [var_Items.SelectableItem(hT) = False]
	endwith
	// var_Items.SortableItem(hT) = false
	with (oGrid)
		TemplateDef = [dim var_Items,hT]
		TemplateDef = var_Items
		TemplateDef = hT
		Template = [var_Items.SortableItem(hT) = False]
	endwith
	// var_Items.ExpandItem(h) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ExpandItem(h) = True]
	endwith
oGrid.EndUpdate()

655
Is it possible to specify the cell's value but still want to display some formatted text instead the value

local h,oGrid,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.Columns.Add("Value")
oGrid.Columns.Add("FormatCell")
var_Items = oGrid.Items
	h = var_Items.AddItem(1)
	// var_Items.CellValue(h,1) = 12
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValue(h,1) = 12]
	endwith
	// var_Items.FormatCell(h,1) = "currency(value)"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.FormatCell(h,1) = "currency(value)"]
	endwith
	h = var_Items.AddItem("01/01/2001")
	// var_Items.CellValue(h,1) = "01/01/2001"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValue(h,1) = #1/1/2001#]
	endwith
	// var_Items.CellValueFormat(h,1) = 1
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValueFormat(h,1) = 1]
	endwith
	// var_Items.FormatCell(h,1) = "longdate(value) replace '2001' with '<b>2001</b>'"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.FormatCell(h,1) = "longdate(value) replace '2001' with '<b>2001</b>'"]
	endwith
oGrid.EndUpdate()

654
How can I simulate displaying groups

local h,h1,oGrid,var_Columns,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.HasLines = 0
oGrid.ScrollBySingleLine = true
var_Columns = oGrid.Columns
	var_Columns.Add("Name")
	var_Columns.Add("A")
	var_Columns.Add("B")
	var_Columns.Add("C")
var_Items = oGrid.Items
	h = var_Items.AddItem("Group 1")
	// var_Items.CellHAlignment(h,0) = 1
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellHAlignment(h,0) = 1]
	endwith
	// var_Items.ItemDivider(h) = 0
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ItemDivider(h) = 0]
	endwith
	// var_Items.ItemDividerLineAlignment(h) = 3
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ItemDividerLineAlignment(h) = 3]
	endwith
	// var_Items.ItemHeight(h) = 24
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ItemHeight(h) = 24]
	endwith
	// var_Items.SortableItem(h) = false
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.SortableItem(h) = False]
	endwith
	h1 = var_Items.InsertItem(h,null,"Child 1")
	// var_Items.CellValue(h1,1) = 1
	with (oGrid)
		TemplateDef = [dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.CellValue(h1,1) = 1]
	endwith
	// var_Items.CellValue(h1,2) = 2
	with (oGrid)
		TemplateDef = [dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.CellValue(h1,2) = 2]
	endwith
	// var_Items.CellValue(h1,3) = 3
	with (oGrid)
		TemplateDef = [dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.CellValue(h1,3) = 3]
	endwith
	h1 = var_Items.InsertItem(h,null,"Child 2")
	// var_Items.CellValue(h1,1) = 4
	with (oGrid)
		TemplateDef = [dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.CellValue(h1,1) = 4]
	endwith
	// var_Items.CellValue(h1,2) = 5
	with (oGrid)
		TemplateDef = [dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.CellValue(h1,2) = 5]
	endwith
	// var_Items.CellValue(h1,3) = 6
	with (oGrid)
		TemplateDef = [dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.CellValue(h1,3) = 6]
	endwith
	// var_Items.ExpandItem(h) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ExpandItem(h) = True]
	endwith
	h = var_Items.AddItem("Group 2")
	// var_Items.CellHAlignment(h,0) = 1
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellHAlignment(h,0) = 1]
	endwith
	// var_Items.ItemDivider(h) = 0
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ItemDivider(h) = 0]
	endwith
	// var_Items.ItemDividerLineAlignment(h) = 3
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ItemDividerLineAlignment(h) = 3]
	endwith
	// var_Items.ItemHeight(h) = 24
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ItemHeight(h) = 24]
	endwith
	// var_Items.SortableItem(h) = false
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.SortableItem(h) = False]
	endwith
	h1 = var_Items.InsertItem(h,null,"Child 1")
	// var_Items.CellValue(h1,1) = 1
	with (oGrid)
		TemplateDef = [dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.CellValue(h1,1) = 1]
	endwith
	// var_Items.CellValue(h1,2) = 2
	with (oGrid)
		TemplateDef = [dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.CellValue(h1,2) = 2]
	endwith
	// var_Items.CellValue(h1,3) = 3
	with (oGrid)
		TemplateDef = [dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.CellValue(h1,3) = 3]
	endwith
	h1 = var_Items.InsertItem(h,null,"Child 2")
	// var_Items.CellValue(h1,1) = 4
	with (oGrid)
		TemplateDef = [dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.CellValue(h1,1) = 4]
	endwith
	// var_Items.CellValue(h1,2) = 5
	with (oGrid)
		TemplateDef = [dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.CellValue(h1,2) = 5]
	endwith
	// var_Items.CellValue(h1,3) = 6
	with (oGrid)
		TemplateDef = [dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.CellValue(h1,3) = 6]
	endwith
	// var_Items.ExpandItem(h) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ExpandItem(h) = True]
	endwith

653
Is it possible to specify the cell's value but still want to display some formatted text instead the value

local h,oGrid,var_Column,var_Columns,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.MarkSearchColumn = false
var_Columns = oGrid.Columns
	var_Columns.Add("Name")
	var_Column = var_Columns.Add("Values")
		var_Column.SortType = 1
		var_Column.AllowSizing = false
		var_Column.Width = 64
		var_Column.FormatColumn = "((0:=dbl(value)) < 10? '<fgcolor=808080><font ;7>' :'<b>') + currency(=:0)"
		// var_Column.Def(17) = 1
		with (oGrid)
			TemplateDef = [dim var_Column]
			TemplateDef = var_Column
			Template = [var_Column.Def(17) = 1]
		endwith
var_Items = oGrid.Items
	h = var_Items.AddItem("Root")
	// var_Items.FormatCell(h,1) = "'<none>'"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.FormatCell(h,1) = "'<none>'"]
	endwith
	// var_Items.CellValue(var_Items.InsertItem(h,null,"Child 1"),1) = 10
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(InsertItem(h,,"Child 1"),1) = 10]
	endwith
	// var_Items.CellValue(var_Items.InsertItem(h,null,"Child 2"),1) = 15
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(InsertItem(h,,"Child 2"),1) = 15]
	endwith
	// var_Items.CellValue(var_Items.InsertItem(h,null,"Child 3"),1) = 25
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(InsertItem(h,,"Child 3"),1) = 25]
	endwith
	// var_Items.ExpandItem(h) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ExpandItem(h) = True]
	endwith
oGrid.EndUpdate()

652
I am using the FormatColumn to display the current currency, but would like hide some values. Is it possible

local h,oGrid,var_Column,var_Columns,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.MarkSearchColumn = false
var_Columns = oGrid.Columns
	var_Columns.Add("Name")
	var_Column = var_Columns.Add("Values")
		var_Column.SortType = 1
		var_Column.AllowSizing = false
		var_Column.Width = 64
		var_Column.FormatColumn = "((0:=dbl(value)) < 10? '<fgcolor=808080><font ;7>' :'<b>') + currency(=:0)"
		// var_Column.Def(17) = 1
		with (oGrid)
			TemplateDef = [dim var_Column]
			TemplateDef = var_Column
			Template = [var_Column.Def(17) = 1]
		endwith
var_Items = oGrid.Items
	h = var_Items.AddItem("Root")
	// var_Items.FormatCell(h,1) = " "
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.FormatCell(h,1) = " "]
	endwith
	// var_Items.CellValue(var_Items.InsertItem(h,null,"Child 1"),1) = 10
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(InsertItem(h,,"Child 1"),1) = 10]
	endwith
	// var_Items.CellValue(var_Items.InsertItem(h,null,"Child 2"),1) = 15
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(InsertItem(h,,"Child 2"),1) = 15]
	endwith
	// var_Items.CellValue(var_Items.InsertItem(h,null,"Child 3"),1) = 25
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(InsertItem(h,,"Child 3"),1) = 25]
	endwith
	// var_Items.ExpandItem(h) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ExpandItem(h) = True]
	endwith
oGrid.EndUpdate()

651
How can I specify an item to be always the first item

local h,oGrid,var_Column,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.TreeColumnIndex = -1
// oGrid.Columns.Add("Numbers").SortType = 1
var_Column = oGrid.Columns.Add("Numbers")
with (oGrid)
	TemplateDef = [dim var_Column]
	TemplateDef = var_Column
	Template = [var_Column.SortType = 1]
endwith
var_Items = oGrid.Items
	var_Items.AddItem(1)
	var_Items.AddItem(2)
	var_Items.AddItem(3)
	var_Items.AddItem(4)
	h = var_Items.AddItem("first")
	// var_Items.ItemPosition(h) = 0
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ItemPosition(h) = 0]
	endwith
	// var_Items.CellHAlignment(h,0) = 2
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellHAlignment(h,0) = 2]
	endwith
	// var_Items.SortableItem(h) = false
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.SortableItem(h) = False]
	endwith
	var_Items.SortChildren(0,0,false)
oGrid.EndUpdate()

650
How can I specify an item to be always the last item

local h,oGrid,var_Column,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.TreeColumnIndex = -1
// oGrid.Columns.Add("Numbers").SortType = 1
var_Column = oGrid.Columns.Add("Numbers")
with (oGrid)
	TemplateDef = [dim var_Column]
	TemplateDef = var_Column
	Template = [var_Column.SortType = 1]
endwith
var_Items = oGrid.Items
	var_Items.AddItem(1)
	var_Items.AddItem(2)
	var_Items.AddItem(3)
	var_Items.AddItem(4)
	h = var_Items.AddItem("last")
	// var_Items.CellHAlignment(h,0) = 2
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellHAlignment(h,0) = 2]
	endwith
	// var_Items.SortableItem(h) = false
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.SortableItem(h) = False]
	endwith
	var_Items.SortChildren(0,0,true)
oGrid.EndUpdate()

649
Can I allow sorting only the child items

local h,oGrid,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.Columns.Add("Childs")
var_Items = oGrid.Items
	h = var_Items.AddItem("Root 1")
	// var_Items.SortableItem(h) = false
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.SortableItem(h) = False]
	endwith
	var_Items.InsertItem(h,null,"Child 1")
	var_Items.InsertItem(h,null,"Child 2")
	// var_Items.ExpandItem(h) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ExpandItem(h) = True]
	endwith
	h = var_Items.AddItem("Root 2")
	// var_Items.SortableItem(h) = false
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.SortableItem(h) = False]
	endwith
	var_Items.InsertItem(h,null,"Child 1")
	var_Items.InsertItem(h,null,"Child 2")
	// var_Items.ExpandItem(h) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ExpandItem(h) = True]
	endwith
oGrid.EndUpdate()

648
Can I specify a terminal item so it will mark the end of childs

local h,oGrid,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.ScrollBySingleLine = true
oGrid.Columns.Add("P1")
var_Items = oGrid.Items
	h = var_Items.AddItem("Root 1")
	var_Items.InsertItem(h,null,"Child 1")
	var_Items.InsertItem(h,null,"Child 2")
	// var_Items.ExpandItem(h) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ExpandItem(h) = True]
	endwith
	h = var_Items.InsertItem(h,"","")
	// var_Items.ItemDivider(h) = 0
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ItemDivider(h) = 0]
	endwith
	// var_Items.ItemDividerLineAlignment(h) = 1
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ItemDividerLineAlignment(h) = 1]
	endwith
	// var_Items.ItemHeight(h) = 2
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ItemHeight(h) = 2]
	endwith
	// var_Items.SelectableItem(h) = false
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.SelectableItem(h) = False]
	endwith
	// var_Items.SortableItem(h) = false
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.SortableItem(h) = False]
	endwith
	h = var_Items.AddItem("Root 2")
	var_Items.InsertItem(h,null,"Child 1")
	var_Items.InsertItem(h,null,"Child 2")
	// var_Items.ExpandItem(h) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ExpandItem(h) = True]
	endwith
	h = var_Items.InsertItem(h,"","")
	// var_Items.ItemDivider(h) = 0
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ItemDivider(h) = 0]
	endwith
	// var_Items.ItemDividerLineAlignment(h) = 1
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ItemDividerLineAlignment(h) = 1]
	endwith
	// var_Items.ItemHeight(h) = 2
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ItemHeight(h) = 2]
	endwith
	// var_Items.SelectableItem(h) = false
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.SelectableItem(h) = False]
	endwith
	// var_Items.SortableItem(h) = false
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.SortableItem(h) = False]
	endwith
oGrid.EndUpdate()

647
Is it possible to specify an item being unsortable so its position won't be changed after sorting

local h,oGrid,var_Column,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.TreeColumnIndex = -1
// oGrid.Columns.Add("Numbers").SortType = 1
var_Column = oGrid.Columns.Add("Numbers")
with (oGrid)
	TemplateDef = [dim var_Column]
	TemplateDef = var_Column
	Template = [var_Column.SortType = 1]
endwith
var_Items = oGrid.Items
	var_Items.AddItem(1)
	var_Items.AddItem(2)
	var_Items.AddItem(3)
	var_Items.AddItem(4)
	h = var_Items.AddItem("top 3")
	// var_Items.ItemPosition(h) = 3
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ItemPosition(h) = 3]
	endwith
	// var_Items.CellHAlignment(h,0) = 2
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellHAlignment(h,0) = 2]
	endwith
	// var_Items.SortableItem(h) = false
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.SortableItem(h) = False]
	endwith
	var_Items.SortChildren(0,0,false)
oGrid.EndUpdate()

646
Is it possible to move an item from a parent to another

local oGrid,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.LinesAtRoot = -1
oGrid.Columns.Add("Items")
var_Items = oGrid.Items
	var_Items.AddItem("A")
	var_Items.AddItem("B")
	var_Items.InsertItem(var_Items.AddItem("C"),"","D")
	var_Items.SetParent(var_Items.FindItem("D",0),var_Items.FindItem("A",0))
oGrid.EndUpdate()

645
How can I change the identation for an item

local oGrid,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.LinesAtRoot = -1
oGrid.Columns.Add("Items")
var_Items = oGrid.Items
	var_Items.AddItem("A")
	var_Items.AddItem("B")
	var_Items.InsertItem(var_Items.AddItem("C"),"","D")
	var_Items.SetParent(var_Items.FindItem("D",0),0)
oGrid.EndUpdate()

644
How can I arrange the control's header on multiple levels

local h,oGrid,var_Column,var_Column1,var_Column2,var_Column3,var_Column4,var_Column5,var_Columns,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.DefaultItemHeight = 48
var_Columns = oGrid.Columns
	// var_Columns.Add("Title").Visible = false
	var_Column = var_Columns.Add("Title")
	with (oGrid)
		TemplateDef = [dim var_Column]
		TemplateDef = var_Column
		Template = [var_Column.Visible = False]
	endwith
	// var_Columns.Add("FirstName").Visible = false
	var_Column1 = var_Columns.Add("FirstName")
	with (oGrid)
		TemplateDef = [dim var_Column1]
		TemplateDef = var_Column1
		Template = [var_Column1.Visible = False]
	endwith
	// var_Columns.Add("LastName").Visible = false
	var_Column2 = var_Columns.Add("LastName")
	with (oGrid)
		TemplateDef = [dim var_Column2]
		TemplateDef = var_Column2
		Template = [var_Column2.Visible = False]
	endwith
	// var_Columns.Add("Photo").Visible = false
	var_Column3 = var_Columns.Add("Photo")
	with (oGrid)
		TemplateDef = [dim var_Column3]
		TemplateDef = var_Column3
		Template = [var_Column3.Visible = False]
	endwith
	var_Column4 = var_Columns.Add("Address")
		var_Column4.Visible = false
		// var_Column4.Def(16) = false
		with (oGrid)
			TemplateDef = [dim var_Column4]
			TemplateDef = var_Column4
			Template = [var_Column4.Def(16) = False]
		endwith
	var_Column5 = var_Columns.Add("Personal Info")
		var_Column5.FormatLevel = "3:48,(0/1/2),4:96"
		// var_Column5.Def(32) = "3:48,(0/1/2),4:96"
		with (oGrid)
			TemplateDef = [dim var_Column5]
			TemplateDef = var_Column5
			Template = [var_Column5.Def(32) = "3:48,(0/1/2),4:96"]
		endwith
var_Items = oGrid.Items
	h = var_Items.AddItem("Sales Representative")
	// var_Items.CellValue(h,1) = "Nancy"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValue(h,1) = "Nancy"]
	endwith
	// var_Items.CellValue(h,2) = "Davolio"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValue(h,2) = "Davolio"]
	endwith
	// var_Items.CellPicture(h,3) = oGrid.ExecuteTemplate("loadpicture(`c:\exontrol\images\zipdisk.gif`)")
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellPicture(h,3) = Me.ExecuteTemplate("loadpicture(`c:\exontrol\images\zipdisk.gif`)")]
	endwith
	// var_Items.CellValue(h,4) = "507-20th Ave. E.Apt.  2A"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValue(h,4) = "507-20th Ave. E.Apt.  2A"]
	endwith
oGrid.EndUpdate()

643
How can I filter programatically using more columns

local oGrid,var_Column,var_Column1,var_Columns,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
var_Columns = oGrid.Columns
	var_Columns.Add("Car")
	var_Columns.Add("Equipment")
var_Items = oGrid.Items
	// var_Items.CellValue(var_Items.AddItem("Mazda"),1) = "Air Bag"
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(AddItem("Mazda"),1) = "Air Bag"]
	endwith
	// var_Items.CellValue(var_Items.AddItem("Toyota"),1) = "Air Bag,Air condition"
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(AddItem("Toyota"),1) = "Air Bag,Air condition"]
	endwith
	// var_Items.CellValue(var_Items.AddItem("Ford"),1) = "Air condition"
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(AddItem("Ford"),1) = "Air condition"]
	endwith
	// var_Items.CellValue(var_Items.AddItem("Nissan"),1) = "Air Bag,ABS,ESP"
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(AddItem("Nissan"),1) = "Air Bag,ABS,ESP"]
	endwith
	// var_Items.CellValue(var_Items.AddItem("Mazda"),1) = "Air Bag, ABS,ESP"
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(AddItem("Mazda"),1) = "Air Bag, ABS,ESP"]
	endwith
	// var_Items.CellValue(var_Items.AddItem("Mazda"),1) = "ABS,ESP"
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(AddItem("Mazda"),1) = "ABS,ESP"]
	endwith
var_Column = oGrid.Columns.Item("Car")
	var_Column.FilterType = 240
	var_Column.Filter = "Mazda"
var_Column1 = oGrid.Columns.Item("Equipment")
	var_Column1.FilterType = 3
	var_Column1.Filter = "*ABS*|*ESP*"
oGrid.ApplyFilter()
oGrid.EndUpdate()

642
How can I show the ticks for a single slider field

local oGrid,var_Editor,var_Editor1,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
// oGrid.Columns.Add("Slider").Editor.EditType = 20
var_Editor = oGrid.Columns.Add("Slider").Editor
with (oGrid)
	TemplateDef = [dim var_Editor]
	TemplateDef = var_Editor
	Template = [var_Editor.EditType = 20]
endwith
var_Items = oGrid.Items
	var_Items.AddItem(10)
	var_Editor1 = var_Items.CellEditor(var_Items.AddItem(20),0)
		var_Editor1.EditType = 20
		// var_Editor1.Option(53) = 10
		with (oGrid)
			TemplateDef = [dim var_Editor1]
			TemplateDef = var_Editor1
			Template = [var_Editor1.Option(53) = 10]
		endwith
	var_Items.AddItem(30)
oGrid.EndUpdate()

641
Is it possible to show ticks for slider fields

local oGrid,var_Editor

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
var_Editor = oGrid.Columns.Add("Slider").Editor
	var_Editor.EditType = 20
	// var_Editor.Option(53) = 10
	with (oGrid)
		TemplateDef = [dim var_Editor]
		TemplateDef = var_Editor
		Template = [var_Editor.Option(53) = 10]
	endwith
oGrid.Items.AddItem(10)

640
Is it possible to colour a particular column, I mean the cell's foreground color

local oGrid,var_Columns,var_ConditionalFormat,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
var_ConditionalFormat = oGrid.ConditionalFormats.Add("1")
	var_ConditionalFormat.ForeColor = 0xff
	var_ConditionalFormat.ApplyTo = 1 /*0x1 | */
oGrid.MarkSearchColumn = false
var_Columns = oGrid.Columns
	var_Columns.Add("Column 1")
	var_Columns.Add("Column 2")
var_Items = oGrid.Items
	// var_Items.CellValue(var_Items.AddItem(0),1) = 1
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(AddItem(0),1) = 1]
	endwith
	// var_Items.CellValue(var_Items.AddItem(2),1) = 3
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(AddItem(2),1) = 3]
	endwith
	// var_Items.CellValue(var_Items.AddItem(4),1) = 5
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(AddItem(4),1) = 5]
	endwith
oGrid.EndUpdate()

639
Is it possible to colour a particular column for specified values

local oGrid,var_Columns,var_ConditionalFormat,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
var_ConditionalFormat = oGrid.ConditionalFormats.Add("int(%1) in (3,4,5)")
	var_ConditionalFormat.BackColor = 0xff
	var_ConditionalFormat.ApplyTo = 1 /*0x1 | */
oGrid.MarkSearchColumn = false
var_Columns = oGrid.Columns
	var_Columns.Add("Column 1")
	var_Columns.Add("Column 2")
var_Items = oGrid.Items
	// var_Items.CellValue(var_Items.AddItem(0),1) = 1
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(AddItem(0),1) = 1]
	endwith
	// var_Items.CellValue(var_Items.AddItem(2),1) = 3
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(AddItem(2),1) = 3]
	endwith
	// var_Items.CellValue(var_Items.AddItem(4),1) = 5
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(AddItem(4),1) = 5]
	endwith
oGrid.EndUpdate()

638
Is it possible to colour a particular column

local oGrid,var_Column,var_Columns,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.MarkSearchColumn = false
var_Columns = oGrid.Columns
	var_Columns.Add("Column 1")
	// var_Columns.Add("Column 2").Def(4) = 255
	var_Column = var_Columns.Add("Column 2")
	with (oGrid)
		TemplateDef = [dim var_Column]
		TemplateDef = var_Column
		Template = [var_Column.Def(4) = 255]
	endwith
var_Items = oGrid.Items
	// var_Items.CellValue(var_Items.AddItem(0),1) = 1
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(AddItem(0),1) = 1]
	endwith
	// var_Items.CellValue(var_Items.AddItem(2),1) = 3
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(AddItem(2),1) = 3]
	endwith
	// var_Items.CellValue(var_Items.AddItem(4),1) = 5
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(AddItem(4),1) = 5]
	endwith
oGrid.EndUpdate()

637
How do i get all the children items that are under a certain parent Item handle
local h,hChild,oGrid,var_Items,var_Items1

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.LinesAtRoot = -1
oGrid.Columns.Add("P")
var_Items = oGrid.Items
	h = var_Items.AddItem("Root")
	var_Items.InsertItem(h,null,"Child 1")
	var_Items.InsertItem(h,null,"Child 2")
	// var_Items.ExpandItem(h) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ExpandItem(h) = True]
	endwith
var_Items1 = oGrid.Items
	hChild = var_Items1.ItemChild(var_Items1.FirstVisibleItem)
	? Str(var_Items1.CellValue(hChild,0)) 
	? Str(var_Items1.CellValue(var_Items1.NextSiblingItem(hChild),0)) 
oGrid.EndUpdate()

636
Is is possible to use HTML tags to display in the filter caption

local oGrid,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.FilterBarPromptVisible = 1
oGrid.FilterBarCaption = "This is a bit of text being displayed in the filter bar."
oGrid.Columns.Add("")
var_Items = oGrid.Items
	var_Items.AddItem("Item 1")
	var_Items.AddItem("Item 2")
	var_Items.AddItem("Item 3")
oGrid.EndUpdate()

635
How can I find the number of items after filtering
local h,oGrid,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.Columns.Add("")
var_Items = oGrid.Items
	h = var_Items.AddItem("")
	// var_Items.CellValue(h,0) = var_Items.VisibleItemCount
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValue(h,0) = VisibleItemCount]
	endwith
oGrid.EndUpdate()

634
How can I change the filter caption

local h0,oGrid,var_Column,var_Column1,var_Columns,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.ColumnAutoResize = true
oGrid.ContinueColumnScroll = false
oGrid.FocusColumnIndex = 1
oGrid.MarkSearchColumn = false
oGrid.SearchColumnIndex = 1
oGrid.FilterBarPromptVisible = 1
oGrid.FilterBarPromptType = 12801 /*exFilterPromptWords | exFilterPromptContainsAll*/
oGrid.FilterBarPromptPattern = "london robert"
oGrid.FilterBarCaption = "<r>Found: ... "
var_Columns = oGrid.Columns
	// var_Columns.Add("Name").Width = 96
	var_Column = var_Columns.Add("Name")
	with (oGrid)
		TemplateDef = [dim var_Column]
		TemplateDef = var_Column
		Template = [var_Column.Width = 96]
	endwith
	// var_Columns.Add("Title").Width = 96
	var_Column1 = var_Columns.Add("Title")
	with (oGrid)
		TemplateDef = [dim var_Column1]
		TemplateDef = var_Column1
		Template = [var_Column1.Width = 96]
	endwith
	var_Columns.Add("City")
var_Items = oGrid.Items
	h0 = var_Items.AddItem("Nancy Davolio")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "Seattle"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Seattle"]
	endwith
	h0 = var_Items.AddItem("Andrew Fuller")
	// var_Items.CellValue(h0,1) = "Vice President, Sales"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Vice President, Sales"]
	endwith
	// var_Items.CellValue(h0,2) = "Tacoma"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Tacoma"]
	endwith
	// var_Items.SelectItem(h0) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.SelectItem(h0) = True]
	endwith
	h0 = var_Items.AddItem("Janet Leverling")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "Kirkland"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Kirkland"]
	endwith
	h0 = var_Items.AddItem("Margaret Peacock")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "Redmond"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Redmond"]
	endwith
	h0 = var_Items.AddItem("Steven Buchanan")
	// var_Items.CellValue(h0,1) = "Sales Manager"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Manager"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
	h0 = var_Items.AddItem("Michael Suyama")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
	h0 = var_Items.AddItem("Robert King")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
	h0 = var_Items.AddItem("Laura Callahan")
	// var_Items.CellValue(h0,1) = "Inside Sales Coordinator"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Inside Sales Coordinator"]
	endwith
	// var_Items.CellValue(h0,2) = "Seattle"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Seattle"]
	endwith
	h0 = var_Items.AddItem("Anne Dodsworth")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
oGrid.EndUpdate()

633
While using the filter prompt is it is possible to use wild characters

local h0,oGrid,var_Column,var_Column1,var_Columns,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.ColumnAutoResize = true
oGrid.ContinueColumnScroll = false
oGrid.FocusColumnIndex = 1
oGrid.MarkSearchColumn = false
oGrid.SearchColumnIndex = 1
oGrid.FilterBarPromptVisible = 1
oGrid.FilterBarPromptType = 16
oGrid.FilterBarPromptPattern = "lon* seat*"
var_Columns = oGrid.Columns
	// var_Columns.Add("Name").Width = 96
	var_Column = var_Columns.Add("Name")
	with (oGrid)
		TemplateDef = [dim var_Column]
		TemplateDef = var_Column
		Template = [var_Column.Width = 96]
	endwith
	// var_Columns.Add("Title").Width = 96
	var_Column1 = var_Columns.Add("Title")
	with (oGrid)
		TemplateDef = [dim var_Column1]
		TemplateDef = var_Column1
		Template = [var_Column1.Width = 96]
	endwith
	var_Columns.Add("City")
var_Items = oGrid.Items
	h0 = var_Items.AddItem("Nancy Davolio")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "Seattle"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Seattle"]
	endwith
	h0 = var_Items.AddItem("Andrew Fuller")
	// var_Items.CellValue(h0,1) = "Vice President, Sales"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Vice President, Sales"]
	endwith
	// var_Items.CellValue(h0,2) = "Tacoma"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Tacoma"]
	endwith
	// var_Items.SelectItem(h0) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.SelectItem(h0) = True]
	endwith
	h0 = var_Items.AddItem("Janet Leverling")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "Kirkland"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Kirkland"]
	endwith
	h0 = var_Items.AddItem("Margaret Peacock")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "Redmond"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Redmond"]
	endwith
	h0 = var_Items.AddItem("Steven Buchanan")
	// var_Items.CellValue(h0,1) = "Sales Manager"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Manager"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
	h0 = var_Items.AddItem("Michael Suyama")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
	h0 = var_Items.AddItem("Robert King")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
	h0 = var_Items.AddItem("Laura Callahan")
	// var_Items.CellValue(h0,1) = "Inside Sales Coordinator"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Inside Sales Coordinator"]
	endwith
	// var_Items.CellValue(h0,2) = "Seattle"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Seattle"]
	endwith
	h0 = var_Items.AddItem("Anne Dodsworth")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
oGrid.EndUpdate()

632
How can I list all items that contains any of specified words, not necessary at the beggining

local h0,oGrid,var_Column,var_Column1,var_Columns,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.ColumnAutoResize = true
oGrid.ContinueColumnScroll = false
oGrid.FocusColumnIndex = 1
oGrid.MarkSearchColumn = false
oGrid.SearchColumnIndex = 1
oGrid.FilterBarPromptVisible = 1
oGrid.FilterBarPromptType = 4610 /*exFilterPromptStartWords | exFilterPromptContainsAny*/
oGrid.FilterBarPromptPattern = "london davolio"
var_Columns = oGrid.Columns
	// var_Columns.Add("Name").Width = 96
	var_Column = var_Columns.Add("Name")
	with (oGrid)
		TemplateDef = [dim var_Column]
		TemplateDef = var_Column
		Template = [var_Column.Width = 96]
	endwith
	// var_Columns.Add("Title").Width = 96
	var_Column1 = var_Columns.Add("Title")
	with (oGrid)
		TemplateDef = [dim var_Column1]
		TemplateDef = var_Column1
		Template = [var_Column1.Width = 96]
	endwith
	var_Columns.Add("City")
var_Items = oGrid.Items
	h0 = var_Items.AddItem("Nancy Davolio")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "Seattle"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Seattle"]
	endwith
	h0 = var_Items.AddItem("Andrew Fuller")
	// var_Items.CellValue(h0,1) = "Vice President, Sales"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Vice President, Sales"]
	endwith
	// var_Items.CellValue(h0,2) = "Tacoma"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Tacoma"]
	endwith
	// var_Items.SelectItem(h0) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.SelectItem(h0) = True]
	endwith
	h0 = var_Items.AddItem("Janet Leverling")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "Kirkland"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Kirkland"]
	endwith
	h0 = var_Items.AddItem("Margaret Peacock")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "Redmond"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Redmond"]
	endwith
	h0 = var_Items.AddItem("Steven Buchanan")
	// var_Items.CellValue(h0,1) = "Sales Manager"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Manager"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
	h0 = var_Items.AddItem("Michael Suyama")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
	h0 = var_Items.AddItem("Robert King")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
	h0 = var_Items.AddItem("Laura Callahan")
	// var_Items.CellValue(h0,1) = "Inside Sales Coordinator"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Inside Sales Coordinator"]
	endwith
	// var_Items.CellValue(h0,2) = "Seattle"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Seattle"]
	endwith
	h0 = var_Items.AddItem("Anne Dodsworth")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
oGrid.EndUpdate()

631
How can I list all items that contains any of specified words, not strings

local h0,oGrid,var_Column,var_Column1,var_Columns,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.ColumnAutoResize = true
oGrid.ContinueColumnScroll = false
oGrid.FocusColumnIndex = 1
oGrid.MarkSearchColumn = false
oGrid.SearchColumnIndex = 1
oGrid.FilterBarPromptVisible = 1
oGrid.FilterBarPromptType = 12802 /*exFilterPromptWords | exFilterPromptContainsAny*/
oGrid.FilterBarPromptPattern = "london nancy"
var_Columns = oGrid.Columns
	// var_Columns.Add("Name").Width = 96
	var_Column = var_Columns.Add("Name")
	with (oGrid)
		TemplateDef = [dim var_Column]
		TemplateDef = var_Column
		Template = [var_Column.Width = 96]
	endwith
	// var_Columns.Add("Title").Width = 96
	var_Column1 = var_Columns.Add("Title")
	with (oGrid)
		TemplateDef = [dim var_Column1]
		TemplateDef = var_Column1
		Template = [var_Column1.Width = 96]
	endwith
	var_Columns.Add("City")
var_Items = oGrid.Items
	h0 = var_Items.AddItem("Nancy Davolio")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "Seattle"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Seattle"]
	endwith
	h0 = var_Items.AddItem("Andrew Fuller")
	// var_Items.CellValue(h0,1) = "Vice President, Sales"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Vice President, Sales"]
	endwith
	// var_Items.CellValue(h0,2) = "Tacoma"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Tacoma"]
	endwith
	// var_Items.SelectItem(h0) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.SelectItem(h0) = True]
	endwith
	h0 = var_Items.AddItem("Janet Leverling")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "Kirkland"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Kirkland"]
	endwith
	h0 = var_Items.AddItem("Margaret Peacock")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "Redmond"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Redmond"]
	endwith
	h0 = var_Items.AddItem("Steven Buchanan")
	// var_Items.CellValue(h0,1) = "Sales Manager"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Manager"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
	h0 = var_Items.AddItem("Michael Suyama")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
	h0 = var_Items.AddItem("Robert King")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
	h0 = var_Items.AddItem("Laura Callahan")
	// var_Items.CellValue(h0,1) = "Inside Sales Coordinator"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Inside Sales Coordinator"]
	endwith
	// var_Items.CellValue(h0,2) = "Seattle"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Seattle"]
	endwith
	h0 = var_Items.AddItem("Anne Dodsworth")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
oGrid.EndUpdate()

630
How can I list all items that contains all specified words, not strings

local h0,oGrid,var_Column,var_Column1,var_Columns,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.ColumnAutoResize = true
oGrid.ContinueColumnScroll = false
oGrid.FocusColumnIndex = 1
oGrid.MarkSearchColumn = false
oGrid.SearchColumnIndex = 1
oGrid.FilterBarPromptVisible = 1
oGrid.FilterBarPromptType = 12801 /*exFilterPromptWords | exFilterPromptContainsAll*/
oGrid.FilterBarPromptPattern = "london robert"
var_Columns = oGrid.Columns
	// var_Columns.Add("Name").Width = 96
	var_Column = var_Columns.Add("Name")
	with (oGrid)
		TemplateDef = [dim var_Column]
		TemplateDef = var_Column
		Template = [var_Column.Width = 96]
	endwith
	// var_Columns.Add("Title").Width = 96
	var_Column1 = var_Columns.Add("Title")
	with (oGrid)
		TemplateDef = [dim var_Column1]
		TemplateDef = var_Column1
		Template = [var_Column1.Width = 96]
	endwith
	var_Columns.Add("City")
var_Items = oGrid.Items
	h0 = var_Items.AddItem("Nancy Davolio")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "Seattle"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Seattle"]
	endwith
	h0 = var_Items.AddItem("Andrew Fuller")
	// var_Items.CellValue(h0,1) = "Vice President, Sales"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Vice President, Sales"]
	endwith
	// var_Items.CellValue(h0,2) = "Tacoma"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Tacoma"]
	endwith
	// var_Items.SelectItem(h0) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.SelectItem(h0) = True]
	endwith
	h0 = var_Items.AddItem("Janet Leverling")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "Kirkland"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Kirkland"]
	endwith
	h0 = var_Items.AddItem("Margaret Peacock")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "Redmond"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Redmond"]
	endwith
	h0 = var_Items.AddItem("Steven Buchanan")
	// var_Items.CellValue(h0,1) = "Sales Manager"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Manager"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
	h0 = var_Items.AddItem("Michael Suyama")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
	h0 = var_Items.AddItem("Robert King")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
	h0 = var_Items.AddItem("Laura Callahan")
	// var_Items.CellValue(h0,1) = "Inside Sales Coordinator"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Inside Sales Coordinator"]
	endwith
	// var_Items.CellValue(h0,2) = "Seattle"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Seattle"]
	endwith
	h0 = var_Items.AddItem("Anne Dodsworth")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
oGrid.EndUpdate()

629
I've noticed that the filtering by prompt is not case sensitive, is is possible to make it case sensitive

local h0,oGrid,var_Column,var_Column1,var_Columns,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.ColumnAutoResize = true
oGrid.ContinueColumnScroll = false
oGrid.FocusColumnIndex = 1
oGrid.MarkSearchColumn = false
oGrid.SearchColumnIndex = 1
oGrid.FilterBarPromptVisible = 1
oGrid.FilterBarPromptType = 258 /*exFilterPromptCaseSensitive | exFilterPromptContainsAny*/
oGrid.FilterBarPromptPattern = "Anne"
var_Columns = oGrid.Columns
	// var_Columns.Add("Name").Width = 96
	var_Column = var_Columns.Add("Name")
	with (oGrid)
		TemplateDef = [dim var_Column]
		TemplateDef = var_Column
		Template = [var_Column.Width = 96]
	endwith
	// var_Columns.Add("Title").Width = 96
	var_Column1 = var_Columns.Add("Title")
	with (oGrid)
		TemplateDef = [dim var_Column1]
		TemplateDef = var_Column1
		Template = [var_Column1.Width = 96]
	endwith
	var_Columns.Add("City")
var_Items = oGrid.Items
	h0 = var_Items.AddItem("Nancy Davolio")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "Seattle"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Seattle"]
	endwith
	h0 = var_Items.AddItem("Andrew Fuller")
	// var_Items.CellValue(h0,1) = "Vice President, Sales"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Vice President, Sales"]
	endwith
	// var_Items.CellValue(h0,2) = "Tacoma"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Tacoma"]
	endwith
	// var_Items.SelectItem(h0) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.SelectItem(h0) = True]
	endwith
	h0 = var_Items.AddItem("Janet Leverling")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "Kirkland"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Kirkland"]
	endwith
	h0 = var_Items.AddItem("Margaret Peacock")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "Redmond"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Redmond"]
	endwith
	h0 = var_Items.AddItem("Steven Buchanan")
	// var_Items.CellValue(h0,1) = "Sales Manager"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Manager"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
	h0 = var_Items.AddItem("Michael Suyama")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
	h0 = var_Items.AddItem("Robert King")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
	h0 = var_Items.AddItem("Laura Callahan")
	// var_Items.CellValue(h0,1) = "Inside Sales Coordinator"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Inside Sales Coordinator"]
	endwith
	// var_Items.CellValue(h0,2) = "Seattle"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Seattle"]
	endwith
	h0 = var_Items.AddItem("Anne Dodsworth")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
oGrid.EndUpdate()

628
Is it possible to list only items that ends with any of specified strings

local h0,oGrid,var_Column,var_Column1,var_Columns,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.ColumnAutoResize = true
oGrid.ContinueColumnScroll = false
oGrid.FocusColumnIndex = 1
oGrid.MarkSearchColumn = false
oGrid.SearchColumnIndex = 1
oGrid.FilterBarPromptVisible = 1
oGrid.FilterBarPromptType = 4
oGrid.FilterBarPromptColumns = "0"
oGrid.FilterBarPromptPattern = "Fuller"
var_Columns = oGrid.Columns
	// var_Columns.Add("Name").Width = 96
	var_Column = var_Columns.Add("Name")
	with (oGrid)
		TemplateDef = [dim var_Column]
		TemplateDef = var_Column
		Template = [var_Column.Width = 96]
	endwith
	// var_Columns.Add("Title").Width = 96
	var_Column1 = var_Columns.Add("Title")
	with (oGrid)
		TemplateDef = [dim var_Column1]
		TemplateDef = var_Column1
		Template = [var_Column1.Width = 96]
	endwith
	var_Columns.Add("City")
var_Items = oGrid.Items
	h0 = var_Items.AddItem("Nancy Davolio")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "Seattle"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Seattle"]
	endwith
	h0 = var_Items.AddItem("Andrew Fuller")
	// var_Items.CellValue(h0,1) = "Vice President, Sales"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Vice President, Sales"]
	endwith
	// var_Items.CellValue(h0,2) = "Tacoma"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Tacoma"]
	endwith
	// var_Items.SelectItem(h0) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.SelectItem(h0) = True]
	endwith
	h0 = var_Items.AddItem("Janet Leverling")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "Kirkland"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Kirkland"]
	endwith
	h0 = var_Items.AddItem("Margaret Peacock")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "Redmond"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Redmond"]
	endwith
	h0 = var_Items.AddItem("Steven Buchanan")
	// var_Items.CellValue(h0,1) = "Sales Manager"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Manager"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
	h0 = var_Items.AddItem("Michael Suyama")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
	h0 = var_Items.AddItem("Robert King")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
	h0 = var_Items.AddItem("Laura Callahan")
	// var_Items.CellValue(h0,1) = "Inside Sales Coordinator"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Inside Sales Coordinator"]
	endwith
	// var_Items.CellValue(h0,2) = "Seattle"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Seattle"]
	endwith
	h0 = var_Items.AddItem("Anne Dodsworth")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
oGrid.EndUpdate()

627
Is it possible to list only items that ends with any of specified strings

local h0,oGrid,var_Column,var_Column1,var_Columns,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.ColumnAutoResize = true
oGrid.ContinueColumnScroll = false
oGrid.FocusColumnIndex = 1
oGrid.MarkSearchColumn = false
oGrid.SearchColumnIndex = 1
oGrid.FilterBarPromptVisible = 1
oGrid.FilterBarPromptType = 4
oGrid.FilterBarPromptColumns = "0"
oGrid.FilterBarPromptPattern = "Fuller"
var_Columns = oGrid.Columns
	// var_Columns.Add("Name").Width = 96
	var_Column = var_Columns.Add("Name")
	with (oGrid)
		TemplateDef = [dim var_Column]
		TemplateDef = var_Column
		Template = [var_Column.Width = 96]
	endwith
	// var_Columns.Add("Title").Width = 96
	var_Column1 = var_Columns.Add("Title")
	with (oGrid)
		TemplateDef = [dim var_Column1]
		TemplateDef = var_Column1
		Template = [var_Column1.Width = 96]
	endwith
	var_Columns.Add("City")
var_Items = oGrid.Items
	h0 = var_Items.AddItem("Nancy Davolio")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "Seattle"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Seattle"]
	endwith
	h0 = var_Items.AddItem("Andrew Fuller")
	// var_Items.CellValue(h0,1) = "Vice President, Sales"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Vice President, Sales"]
	endwith
	// var_Items.CellValue(h0,2) = "Tacoma"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Tacoma"]
	endwith
	// var_Items.SelectItem(h0) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.SelectItem(h0) = True]
	endwith
	h0 = var_Items.AddItem("Janet Leverling")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "Kirkland"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Kirkland"]
	endwith
	h0 = var_Items.AddItem("Margaret Peacock")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "Redmond"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Redmond"]
	endwith
	h0 = var_Items.AddItem("Steven Buchanan")
	// var_Items.CellValue(h0,1) = "Sales Manager"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Manager"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
	h0 = var_Items.AddItem("Michael Suyama")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
	h0 = var_Items.AddItem("Robert King")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
	h0 = var_Items.AddItem("Laura Callahan")
	// var_Items.CellValue(h0,1) = "Inside Sales Coordinator"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Inside Sales Coordinator"]
	endwith
	// var_Items.CellValue(h0,2) = "Seattle"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Seattle"]
	endwith
	h0 = var_Items.AddItem("Anne Dodsworth")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
oGrid.EndUpdate()

626
Is it possible to list only items that starts with any of specified strings

local h0,oGrid,var_Column,var_Column1,var_Columns,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.ColumnAutoResize = true
oGrid.ContinueColumnScroll = false
oGrid.FocusColumnIndex = 1
oGrid.MarkSearchColumn = false
oGrid.SearchColumnIndex = 1
oGrid.FilterBarPromptVisible = 1
oGrid.FilterBarPromptType = 3
oGrid.FilterBarPromptColumns = "0"
oGrid.FilterBarPromptPattern = "An M"
var_Columns = oGrid.Columns
	// var_Columns.Add("Name").Width = 96
	var_Column = var_Columns.Add("Name")
	with (oGrid)
		TemplateDef = [dim var_Column]
		TemplateDef = var_Column
		Template = [var_Column.Width = 96]
	endwith
	// var_Columns.Add("Title").Width = 96
	var_Column1 = var_Columns.Add("Title")
	with (oGrid)
		TemplateDef = [dim var_Column1]
		TemplateDef = var_Column1
		Template = [var_Column1.Width = 96]
	endwith
	var_Columns.Add("City")
var_Items = oGrid.Items
	h0 = var_Items.AddItem("Nancy Davolio")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "Seattle"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Seattle"]
	endwith
	h0 = var_Items.AddItem("Andrew Fuller")
	// var_Items.CellValue(h0,1) = "Vice President, Sales"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Vice President, Sales"]
	endwith
	// var_Items.CellValue(h0,2) = "Tacoma"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Tacoma"]
	endwith
	// var_Items.SelectItem(h0) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.SelectItem(h0) = True]
	endwith
	h0 = var_Items.AddItem("Janet Leverling")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "Kirkland"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Kirkland"]
	endwith
	h0 = var_Items.AddItem("Margaret Peacock")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "Redmond"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Redmond"]
	endwith
	h0 = var_Items.AddItem("Steven Buchanan")
	// var_Items.CellValue(h0,1) = "Sales Manager"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Manager"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
	h0 = var_Items.AddItem("Michael Suyama")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
	h0 = var_Items.AddItem("Robert King")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
	h0 = var_Items.AddItem("Laura Callahan")
	// var_Items.CellValue(h0,1) = "Inside Sales Coordinator"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Inside Sales Coordinator"]
	endwith
	// var_Items.CellValue(h0,2) = "Seattle"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Seattle"]
	endwith
	h0 = var_Items.AddItem("Anne Dodsworth")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
oGrid.EndUpdate()

625
Is it possible to list only items that starts with specified string

local h0,oGrid,var_Column,var_Column1,var_Columns,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.ColumnAutoResize = true
oGrid.ContinueColumnScroll = false
oGrid.FocusColumnIndex = 1
oGrid.MarkSearchColumn = false
oGrid.SearchColumnIndex = 1
oGrid.FilterBarPromptVisible = 1
oGrid.FilterBarPromptType = 3
oGrid.FilterBarPromptColumns = "0"
oGrid.FilterBarPromptPattern = "A"
var_Columns = oGrid.Columns
	// var_Columns.Add("Name").Width = 96
	var_Column = var_Columns.Add("Name")
	with (oGrid)
		TemplateDef = [dim var_Column]
		TemplateDef = var_Column
		Template = [var_Column.Width = 96]
	endwith
	// var_Columns.Add("Title").Width = 96
	var_Column1 = var_Columns.Add("Title")
	with (oGrid)
		TemplateDef = [dim var_Column1]
		TemplateDef = var_Column1
		Template = [var_Column1.Width = 96]
	endwith
	var_Columns.Add("City")
var_Items = oGrid.Items
	h0 = var_Items.AddItem("Nancy Davolio")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "Seattle"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Seattle"]
	endwith
	h0 = var_Items.AddItem("Andrew Fuller")
	// var_Items.CellValue(h0,1) = "Vice President, Sales"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Vice President, Sales"]
	endwith
	// var_Items.CellValue(h0,2) = "Tacoma"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Tacoma"]
	endwith
	// var_Items.SelectItem(h0) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.SelectItem(h0) = True]
	endwith
	h0 = var_Items.AddItem("Janet Leverling")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "Kirkland"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Kirkland"]
	endwith
	h0 = var_Items.AddItem("Margaret Peacock")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "Redmond"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Redmond"]
	endwith
	h0 = var_Items.AddItem("Steven Buchanan")
	// var_Items.CellValue(h0,1) = "Sales Manager"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Manager"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
	h0 = var_Items.AddItem("Michael Suyama")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
	h0 = var_Items.AddItem("Robert King")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
	h0 = var_Items.AddItem("Laura Callahan")
	// var_Items.CellValue(h0,1) = "Inside Sales Coordinator"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Inside Sales Coordinator"]
	endwith
	// var_Items.CellValue(h0,2) = "Seattle"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Seattle"]
	endwith
	h0 = var_Items.AddItem("Anne Dodsworth")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
oGrid.EndUpdate()

624
How can I specify that the list should include any of the seqeunces in the pattern

local h0,oGrid,var_Column,var_Column1,var_Columns,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.ColumnAutoResize = true
oGrid.ContinueColumnScroll = false
oGrid.FocusColumnIndex = 1
oGrid.MarkSearchColumn = false
oGrid.SearchColumnIndex = 1
oGrid.FilterBarPromptVisible = 1
oGrid.FilterBarPromptType = 2
oGrid.FilterBarPromptPattern = "london seattle"
var_Columns = oGrid.Columns
	// var_Columns.Add("Name").Width = 96
	var_Column = var_Columns.Add("Name")
	with (oGrid)
		TemplateDef = [dim var_Column]
		TemplateDef = var_Column
		Template = [var_Column.Width = 96]
	endwith
	// var_Columns.Add("Title").Width = 96
	var_Column1 = var_Columns.Add("Title")
	with (oGrid)
		TemplateDef = [dim var_Column1]
		TemplateDef = var_Column1
		Template = [var_Column1.Width = 96]
	endwith
	var_Columns.Add("City")
var_Items = oGrid.Items
	h0 = var_Items.AddItem("Nancy Davolio")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "Seattle"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Seattle"]
	endwith
	h0 = var_Items.AddItem("Andrew Fuller")
	// var_Items.CellValue(h0,1) = "Vice President, Sales"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Vice President, Sales"]
	endwith
	// var_Items.CellValue(h0,2) = "Tacoma"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Tacoma"]
	endwith
	// var_Items.SelectItem(h0) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.SelectItem(h0) = True]
	endwith
	h0 = var_Items.AddItem("Janet Leverling")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "Kirkland"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Kirkland"]
	endwith
	h0 = var_Items.AddItem("Margaret Peacock")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "Redmond"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Redmond"]
	endwith
	h0 = var_Items.AddItem("Steven Buchanan")
	// var_Items.CellValue(h0,1) = "Sales Manager"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Manager"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
	h0 = var_Items.AddItem("Michael Suyama")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
	h0 = var_Items.AddItem("Robert King")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
	h0 = var_Items.AddItem("Laura Callahan")
	// var_Items.CellValue(h0,1) = "Inside Sales Coordinator"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Inside Sales Coordinator"]
	endwith
	// var_Items.CellValue(h0,2) = "Seattle"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Seattle"]
	endwith
	h0 = var_Items.AddItem("Anne Dodsworth")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
oGrid.EndUpdate()

623
How can I specify that all sequences in the filter pattern must be included in the list

local h0,oGrid,var_Column,var_Column1,var_Columns,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.ColumnAutoResize = true
oGrid.ContinueColumnScroll = false
oGrid.FocusColumnIndex = 1
oGrid.MarkSearchColumn = false
oGrid.SearchColumnIndex = 1
oGrid.FilterBarPromptVisible = 1
oGrid.FilterBarPromptType = 1
oGrid.FilterBarPromptPattern = "london manager"
var_Columns = oGrid.Columns
	// var_Columns.Add("Name").Width = 96
	var_Column = var_Columns.Add("Name")
	with (oGrid)
		TemplateDef = [dim var_Column]
		TemplateDef = var_Column
		Template = [var_Column.Width = 96]
	endwith
	// var_Columns.Add("Title").Width = 96
	var_Column1 = var_Columns.Add("Title")
	with (oGrid)
		TemplateDef = [dim var_Column1]
		TemplateDef = var_Column1
		Template = [var_Column1.Width = 96]
	endwith
	var_Columns.Add("City")
var_Items = oGrid.Items
	h0 = var_Items.AddItem("Nancy Davolio")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "Seattle"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Seattle"]
	endwith
	h0 = var_Items.AddItem("Andrew Fuller")
	// var_Items.CellValue(h0,1) = "Vice President, Sales"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Vice President, Sales"]
	endwith
	// var_Items.CellValue(h0,2) = "Tacoma"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Tacoma"]
	endwith
	// var_Items.SelectItem(h0) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.SelectItem(h0) = True]
	endwith
	h0 = var_Items.AddItem("Janet Leverling")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "Kirkland"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Kirkland"]
	endwith
	h0 = var_Items.AddItem("Margaret Peacock")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "Redmond"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Redmond"]
	endwith
	h0 = var_Items.AddItem("Steven Buchanan")
	// var_Items.CellValue(h0,1) = "Sales Manager"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Manager"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
	h0 = var_Items.AddItem("Michael Suyama")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
	h0 = var_Items.AddItem("Robert King")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
	h0 = var_Items.AddItem("Laura Callahan")
	// var_Items.CellValue(h0,1) = "Inside Sales Coordinator"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Inside Sales Coordinator"]
	endwith
	// var_Items.CellValue(h0,2) = "Seattle"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Seattle"]
	endwith
	h0 = var_Items.AddItem("Anne Dodsworth")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
oGrid.EndUpdate()

622
How do I change at runtime the filter prompt

local h0,oGrid,var_Column,var_Column1,var_Columns,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.ColumnAutoResize = true
oGrid.ContinueColumnScroll = false
oGrid.FocusColumnIndex = 1
oGrid.MarkSearchColumn = false
oGrid.SearchColumnIndex = 1
oGrid.FilterBarPromptVisible = 1
oGrid.FilterBarPromptPattern = "london manager"
var_Columns = oGrid.Columns
	// var_Columns.Add("Name").Width = 96
	var_Column = var_Columns.Add("Name")
	with (oGrid)
		TemplateDef = [dim var_Column]
		TemplateDef = var_Column
		Template = [var_Column.Width = 96]
	endwith
	// var_Columns.Add("Title").Width = 96
	var_Column1 = var_Columns.Add("Title")
	with (oGrid)
		TemplateDef = [dim var_Column1]
		TemplateDef = var_Column1
		Template = [var_Column1.Width = 96]
	endwith
	var_Columns.Add("City")
var_Items = oGrid.Items
	h0 = var_Items.AddItem("Nancy Davolio")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "Seattle"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Seattle"]
	endwith
	h0 = var_Items.AddItem("Andrew Fuller")
	// var_Items.CellValue(h0,1) = "Vice President, Sales"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Vice President, Sales"]
	endwith
	// var_Items.CellValue(h0,2) = "Tacoma"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Tacoma"]
	endwith
	// var_Items.SelectItem(h0) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.SelectItem(h0) = True]
	endwith
	h0 = var_Items.AddItem("Janet Leverling")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "Kirkland"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Kirkland"]
	endwith
	h0 = var_Items.AddItem("Margaret Peacock")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "Redmond"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Redmond"]
	endwith
	h0 = var_Items.AddItem("Steven Buchanan")
	// var_Items.CellValue(h0,1) = "Sales Manager"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Manager"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
	h0 = var_Items.AddItem("Michael Suyama")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
	h0 = var_Items.AddItem("Robert King")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
	h0 = var_Items.AddItem("Laura Callahan")
	// var_Items.CellValue(h0,1) = "Inside Sales Coordinator"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Inside Sales Coordinator"]
	endwith
	// var_Items.CellValue(h0,2) = "Seattle"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Seattle"]
	endwith
	h0 = var_Items.AddItem("Anne Dodsworth")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
oGrid.EndUpdate()

621
How do I specify to filter only a single column when using the filter prompt

local h0,oGrid,var_Column,var_Column1,var_Columns,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.ColumnAutoResize = true
oGrid.ContinueColumnScroll = false
oGrid.FocusColumnIndex = 1
oGrid.MarkSearchColumn = false
oGrid.SearchColumnIndex = 1
oGrid.FilterBarPromptVisible = 1
oGrid.FilterBarPromptColumns = "2,3"
oGrid.FilterBarPromptPattern = "london"
var_Columns = oGrid.Columns
	// var_Columns.Add("Name").Width = 96
	var_Column = var_Columns.Add("Name")
	with (oGrid)
		TemplateDef = [dim var_Column]
		TemplateDef = var_Column
		Template = [var_Column.Width = 96]
	endwith
	// var_Columns.Add("Title").Width = 96
	var_Column1 = var_Columns.Add("Title")
	with (oGrid)
		TemplateDef = [dim var_Column1]
		TemplateDef = var_Column1
		Template = [var_Column1.Width = 96]
	endwith
	var_Columns.Add("City")
var_Items = oGrid.Items
	h0 = var_Items.AddItem("Nancy Davolio")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "Seattle"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Seattle"]
	endwith
	h0 = var_Items.AddItem("Andrew Fuller")
	// var_Items.CellValue(h0,1) = "Vice President, Sales"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Vice President, Sales"]
	endwith
	// var_Items.CellValue(h0,2) = "Tacoma"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Tacoma"]
	endwith
	// var_Items.SelectItem(h0) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.SelectItem(h0) = True]
	endwith
	h0 = var_Items.AddItem("Janet Leverling")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "Kirkland"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Kirkland"]
	endwith
	h0 = var_Items.AddItem("Margaret Peacock")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "Redmond"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Redmond"]
	endwith
	h0 = var_Items.AddItem("Steven Buchanan")
	// var_Items.CellValue(h0,1) = "Sales Manager"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Manager"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
	h0 = var_Items.AddItem("Michael Suyama")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
	h0 = var_Items.AddItem("Robert King")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
	h0 = var_Items.AddItem("Laura Callahan")
	// var_Items.CellValue(h0,1) = "Inside Sales Coordinator"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Inside Sales Coordinator"]
	endwith
	// var_Items.CellValue(h0,2) = "Seattle"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Seattle"]
	endwith
	h0 = var_Items.AddItem("Anne Dodsworth")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
oGrid.EndUpdate()

620
How do I change the prompt or the caption being displayed in the filter bar

local oGrid,var_Column,var_Column1,var_Columns

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.ColumnAutoResize = true
oGrid.ContinueColumnScroll = false
oGrid.FocusColumnIndex = 1
oGrid.MarkSearchColumn = false
oGrid.SearchColumnIndex = 1
oGrid.FilterBarPromptVisible = 1
oGrid.FilterBarPrompt = "changed"
var_Columns = oGrid.Columns
	// var_Columns.Add("Name").Width = 96
	var_Column = var_Columns.Add("Name")
	with (oGrid)
		TemplateDef = [dim var_Column]
		TemplateDef = var_Column
		Template = [var_Column.Width = 96]
	endwith
	// var_Columns.Add("Title").Width = 96
	var_Column1 = var_Columns.Add("Title")
	with (oGrid)
		TemplateDef = [dim var_Column1]
		TemplateDef = var_Column1
		Template = [var_Column1.Width = 96]
	endwith
	var_Columns.Add("City")
oGrid.EndUpdate()

619
How do I enable the filter prompt feature

local h0,oGrid,var_Column,var_Column1,var_Columns,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.ColumnAutoResize = true
oGrid.ContinueColumnScroll = false
oGrid.FocusColumnIndex = 1
oGrid.MarkSearchColumn = false
oGrid.SearchColumnIndex = 1
oGrid.FilterBarPromptVisible = 1
var_Columns = oGrid.Columns
	// var_Columns.Add("Name").Width = 96
	var_Column = var_Columns.Add("Name")
	with (oGrid)
		TemplateDef = [dim var_Column]
		TemplateDef = var_Column
		Template = [var_Column.Width = 96]
	endwith
	// var_Columns.Add("Title").Width = 96
	var_Column1 = var_Columns.Add("Title")
	with (oGrid)
		TemplateDef = [dim var_Column1]
		TemplateDef = var_Column1
		Template = [var_Column1.Width = 96]
	endwith
	var_Columns.Add("City")
var_Items = oGrid.Items
	h0 = var_Items.AddItem("Nancy Davolio")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "Seattle"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Seattle"]
	endwith
	h0 = var_Items.AddItem("Andrew Fuller")
	// var_Items.CellValue(h0,1) = "Vice President, Sales"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Vice President, Sales"]
	endwith
	// var_Items.CellValue(h0,2) = "Tacoma"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Tacoma"]
	endwith
	// var_Items.SelectItem(h0) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.SelectItem(h0) = True]
	endwith
	h0 = var_Items.AddItem("Janet Leverling")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "Kirkland"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Kirkland"]
	endwith
	h0 = var_Items.AddItem("Margaret Peacock")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "Redmond"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Redmond"]
	endwith
	h0 = var_Items.AddItem("Steven Buchanan")
	// var_Items.CellValue(h0,1) = "Sales Manager"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Manager"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
	h0 = var_Items.AddItem("Michael Suyama")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
	h0 = var_Items.AddItem("Robert King")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
	h0 = var_Items.AddItem("Laura Callahan")
	// var_Items.CellValue(h0,1) = "Inside Sales Coordinator"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Inside Sales Coordinator"]
	endwith
	// var_Items.CellValue(h0,2) = "Seattle"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "Seattle"]
	endwith
	h0 = var_Items.AddItem("Anne Dodsworth")
	// var_Items.CellValue(h0,1) = "Sales Representative"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,1) = "Sales Representative"]
	endwith
	// var_Items.CellValue(h0,2) = "London"
	with (oGrid)
		TemplateDef = [dim var_Items,h0]
		TemplateDef = var_Items
		TemplateDef = h0
		Template = [var_Items.CellValue(h0,2) = "London"]
	endwith
oGrid.EndUpdate()

618
How can I control the colors that can be applied to an EBN part

/*
with (this.EXGRIDACTIVEXCONTROL1.nativeObject)
	Change = class::nativeObject_Change
endwith
*/
// Occurs when the user changes the cell's content.
function nativeObject_Change(Item,ColIndex,NewValue)
	local var_Items
	oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
	var_Items = oGrid.Items
		// var_Items.ItemBackColor(var_Items.FirstVisibleItem) = NewValue
		with (oGrid)
			TemplateDef = [dim var_Items]
			TemplateDef = var_Items
			Template = [var_Items.ItemBackColor(FirstVisibleItem) = NewValue]
		endwith
return

local h,oGrid,var_Appearance,var_Column,var_Column1,var_Columns,var_Editor,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
var_Appearance = oGrid.VisualAppearance
	var_Appearance.Add(2,"c:\exontrol\images\normal.ebn")
	var_Appearance.Add(1,"CP:2 10 3 -10 -5")
oGrid.SelBackColor = oGrid.BackColor
oGrid.SelForeColor = oGrid.ForeColor
oGrid.ScrollBySingleLine = true
oGrid.TreeColumnIndex = -1
var_Columns = oGrid.Columns
	var_Column = var_Columns.Add("Test")
		var_Column.Width = 32
	var_Column1 = var_Columns.Add("RGB")
		var_Editor = var_Column1.Editor
			var_Editor.EditType = 20
			// var_Editor.Option(44) = 255
			with (oGrid)
				TemplateDef = [dim var_Editor]
				TemplateDef = var_Editor
				Template = [var_Editor.Option(44) = 255]
			endwith
			// var_Editor.Option(41) = -60
			with (oGrid)
				TemplateDef = [dim var_Editor]
				TemplateDef = var_Editor
				Template = [var_Editor.Option(41) = -60]
			endwith
var_Items = oGrid.Items
	h = var_Items.AddItem("")
	// var_Items.CellHAlignment(h,0) = 1
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellHAlignment(h,0) = 1]
	endwith
	// var_Items.ItemDivider(h) = 0
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ItemDivider(h) = 0]
	endwith
	// var_Items.ItemBackColor(h) = 0x1000000
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ItemBackColor(h) = 16777216]
	endwith
	// var_Items.ItemHeight(h) = 36
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ItemHeight(h) = 36]
	endwith
	// var_Items.SelectableItem(h) = false
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.SelectableItem(h) = False]
	endwith
	h = var_Items.InsertItem(0,1,"Red")
	// var_Items.CellValue(h,1) = 255
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValue(h,1) = 255]
	endwith
	h = var_Items.InsertItem(0,255,"Green")
	// var_Items.CellValue(h,1) = 255
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValue(h,1) = 255]
	endwith
	h = var_Items.InsertItem(0,65536,"Blue")
	// var_Items.CellValue(h,1) = 255
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValue(h,1) = 255]
	endwith
oGrid.EndUpdate()

617
I know this is fairly basic, but could you send me a sample that places a tree in the first column

local h,oGrid,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.LinesAtRoot = -1
oGrid.Columns.Add("heading")
var_Items = oGrid.Items
	h = var_Items.AddItem("Parent 1")
	var_Items.InsertItem(h,null,"Child A")
	var_Items.InsertItem(var_Items.InsertItem(h,null,"Child B"),null,"GrandChild C")
	// var_Items.ExpandItem(h) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ExpandItem(h) = True]
	endwith
	h = var_Items.AddItem("Parent 2")
	var_Items.InsertItem(h,null,"Child D")
	var_Items.InsertItem(h,null,"Child E")
	// var_Items.ExpandItem(h) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ExpandItem(h) = True]
	endwith
oGrid.EndUpdate()

616
How can I get the caption of focused item
/*
with (this.EXGRIDACTIVEXCONTROL1.nativeObject)
	SelectionChanged = class::nativeObject_SelectionChanged
endwith
*/
// Fired after a new item has been selected.
function nativeObject_SelectionChanged()
	local var_Items
	oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
	var_Items = oGrid.Items
		? "Handle" 
		? Str(var_Items.FocusItem) 
		? "Caption" 
		? var_Items.CellCaption(var_Items.FocusItem,0) 
return

local h,oGrid,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.LinesAtRoot = -1
oGrid.Columns.Add("Items")
var_Items = oGrid.Items
	h = var_Items.AddItem("R1")
	var_Items.InsertItem(h,null,"Cell 1.1")
	var_Items.InsertItem(h,null,"Cell 1.2")
	// var_Items.ExpandItem(h) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ExpandItem(h) = True]
	endwith
	h = var_Items.AddItem("R2")
	var_Items.InsertItem(h,null,"Cell 2.1")
	var_Items.InsertItem(h,null,"Cell 2.2")
	// var_Items.ExpandItem(h) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ExpandItem(h) = True]
	endwith
oGrid.EndUpdate()

615
How can I get the caption of selected item
/*
with (this.EXGRIDACTIVEXCONTROL1.nativeObject)
	SelectionChanged = class::nativeObject_SelectionChanged
endwith
*/
// Fired after a new item has been selected.
function nativeObject_SelectionChanged()
	local var_Items
	oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
	var_Items = oGrid.Items
		? "Handle" 
		? Str(var_Items.SelectedItem(0)) 
		? "Caption" 
		? var_Items.CellCaption(var_Items.SelectedItem(0),0) 
return

local h,oGrid,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.LinesAtRoot = -1
oGrid.Columns.Add("Items")
var_Items = oGrid.Items
	h = var_Items.AddItem("R1")
	var_Items.InsertItem(h,null,"Cell 1.1")
	var_Items.InsertItem(h,null,"Cell 1.2")
	// var_Items.ExpandItem(h) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ExpandItem(h) = True]
	endwith
	h = var_Items.AddItem("R2")
	var_Items.InsertItem(h,null,"Cell 2.1")
	var_Items.InsertItem(h,null,"Cell 2.2")
	// var_Items.ExpandItem(h) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ExpandItem(h) = True]
	endwith
oGrid.EndUpdate()

614
Is it possible to let users selects cells as in Excel

local h,h1,oGrid,var_Column,var_Column1,var_Column2,var_Columns,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.FullRowSelect = 1
oGrid.SingleSel = false
oGrid.ReadOnly = -1
oGrid.MarkSearchColumn = false
oGrid.ShowFocusRect = false
oGrid.LinesAtRoot = -1
oGrid.SelForeColor = 0x0
oGrid.SelBackColor = 0xf2e1c8
var_Columns = oGrid.Columns
	var_Columns.Add("A")
	var_Column = var_Columns.Add("B")
		var_Column.AllowSizing = false
		var_Column.Width = 24
	var_Column1 = var_Columns.Add("C")
		var_Column1.AllowSizing = false
		var_Column1.Width = 24
		// var_Column1.Def(0) = 1
		with (oGrid)
			TemplateDef = [dim var_Column1]
			TemplateDef = var_Column1
			Template = [var_Column1.Def(0) = 1]
		endwith
		var_Column1.PartialCheck = true
	var_Column2 = var_Columns.Add("D")
		var_Column2.AllowSizing = false
		var_Column2.Width = 24
		// var_Column2.Def(1) = 1
		with (oGrid)
			TemplateDef = [dim var_Column2]
			TemplateDef = var_Column2
			Template = [var_Column2.Def(1) = 1]
		endwith
var_Items = oGrid.Items
	h = var_Items.InsertItem(null,null,"Group 1")
	h1 = var_Items.InsertItem(h,null,16)
	// var_Items.CellValue(h1,1) = 17
	with (oGrid)
		TemplateDef = [dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.CellValue(h1,1) = 17]
	endwith
	h1 = var_Items.InsertItem(h,null,2)
	// var_Items.CellValue(h1,1) = 11
	with (oGrid)
		TemplateDef = [dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.CellValue(h1,1) = 11]
	endwith
	h1 = var_Items.InsertItem(h,null,2)
	// var_Items.ItemBackColor(h1) = 0xf0f0f0
	with (oGrid)
		TemplateDef = [dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.ItemBackColor(h1) = 15790320]
	endwith
	// var_Items.CellValue(h1,1) = 9
	with (oGrid)
		TemplateDef = [dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.CellValue(h1,1) = 9]
	endwith
	// var_Items.ExpandItem(h) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ExpandItem(h) = True]
	endwith
	h = var_Items.InsertItem(null,null,"Group 2")
	// var_Items.CellValueFormat(h,2) = 1
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValueFormat(h,2) = 1]
	endwith
	h1 = var_Items.InsertItem(h,null,16)
	// var_Items.CellValue(h1,1) = 9
	with (oGrid)
		TemplateDef = [dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.CellValue(h1,1) = 9]
	endwith
	h1 = var_Items.InsertItem(h,null,12)
	// var_Items.CellValue(h1,1) = 11
	with (oGrid)
		TemplateDef = [dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.CellValue(h1,1) = 11]
	endwith
	h1 = var_Items.InsertItem(h,null,2)
	// var_Items.CellValue(h1,1) = 2
	with (oGrid)
		TemplateDef = [dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.CellValue(h1,1) = 2]
	endwith
	// var_Items.ExpandItem(h) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ExpandItem(h) = True]
	endwith
	// var_Items.SelectItem(h) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.SelectItem(h) = True]
	endwith
oGrid.EndUpdate()

613
Is it possible to change the style for the vertical or horizontal grid lines, in the list area

local h,oGrid,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.DrawGridLines = -1
oGrid.GridLineStyle = 33 /*exGridLinesVSolid | exGridLinesHDot4*/
oGrid.Columns.Add("C1")
oGrid.Columns.Add("C2")
oGrid.Columns.Add("C3")
var_Items = oGrid.Items
	h = var_Items.AddItem("Item 1")
	// var_Items.CellValue(h,1) = "SubItem 1.2"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValue(h,1) = "SubItem 1.2"]
	endwith
	// var_Items.CellValue(h,2) = "SubItem 1.3"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValue(h,2) = "SubItem 1.3"]
	endwith
	h = var_Items.AddItem("Item 2")
	// var_Items.CellValue(h,1) = "SubItem 2.2"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValue(h,1) = "SubItem 2.2"]
	endwith
	// var_Items.CellValue(h,2) = "SubItem 2.3"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValue(h,2) = "SubItem 2.3"]
	endwith
oGrid.EndUpdate()

612
Is it possible to change the style for the grid lines, for instance to be solid not dotted

local oGrid

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.DrawGridLines = -1
oGrid.GridLineStyle = 48
oGrid.Columns.Add("Column")
oGrid.EndUpdate()

611
I have some buttons added on the control's scroll bar, how can I can know when the button is being clicked

/*
with (this.EXGRIDACTIVEXCONTROL1.nativeObject)
	ScrollButtonClick = class::nativeObject_ScrollButtonClick
endwith
*/
// Occurs when the user clicks a button in the scrollbar.
function nativeObject_ScrollButtonClick(ScrollBar,ScrollPart)
	oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
	? Str(ScrollBar) 
	? Str(ScrollPart) 
return

local oGrid

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.Template = [ScrollPartVisible(1,32768) = True] // oGrid.ScrollPartVisible(1,32768) = true
oGrid.Template = [ScrollPartVisible(1,16384) = True] // oGrid.ScrollPartVisible(1,16384) = true
oGrid.Template = [ScrollPartVisible(1,1) = True] // oGrid.ScrollPartVisible(1,1) = true
oGrid.Template = [ScrollPartVisible(1,2) = True] // oGrid.ScrollPartVisible(1,2) = true
oGrid.ScrollBars = 5

610
How do I get notified once the user clicks a hyperlink created using the anchor HTML tag

/*
with (this.EXGRIDACTIVEXCONTROL1.nativeObject)
	AnchorClick = class::nativeObject_AnchorClick
endwith
*/
// Occurs when an anchor element is clicked.
function nativeObject_AnchorClick(AnchorID,Options)
	oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
	? Str(AnchorID) 
	? Str(Options) 
return

local oGrid,var_Column,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
// oGrid.Columns.Add("Default").Def(17) = 1
var_Column = oGrid.Columns.Add("Default")
with (oGrid)
	TemplateDef = [dim var_Column]
	TemplateDef = var_Column
	Template = [var_Column.Def(17) = 1]
endwith
var_Items = oGrid.Items
	var_Items.AddItem("This is a link: <aex.com;1>www.exontrol.com</a>")
	var_Items.AddItem("This is a link: <aex.net;2>www.exontrol.net</a>")

609
Is it possible to start editing a cell when double click it

/*
with (this.EXGRIDACTIVEXCONTROL1.nativeObject)
	DblClick = class::nativeObject_DblClick
endwith
*/
// Occurs when the user dblclk the left mouse button over an object.
function nativeObject_DblClick(Shift,X,Y)
	oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
	oGrid.Edit()
return

local oGrid,var_Editor,var_Editor1,var_Items,var_Items1

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.AutoEdit = false
oGrid.MarkSearchColumn = false
// oGrid.Columns.Add("Edit1").Editor.EditType = 1
var_Editor = oGrid.Columns.Add("Edit1").Editor
with (oGrid)
	TemplateDef = [dim var_Editor]
	TemplateDef = var_Editor
	Template = [var_Editor.EditType = 1]
endwith
// oGrid.Columns.Add("Edit2").Editor.EditType = 1
var_Editor1 = oGrid.Columns.Add("Edit2").Editor
with (oGrid)
	TemplateDef = [dim var_Editor1]
	TemplateDef = var_Editor1
	Template = [var_Editor1.EditType = 1]
endwith
var_Items = oGrid.Items
	// var_Items.CellValue(var_Items.AddItem(1),1) = 2
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(AddItem(1),1) = 2]
	endwith
var_Items1 = oGrid.Items
	// var_Items1.CellValue(var_Items1.AddItem(3),1) = 4
	with (oGrid)
		TemplateDef = [dim var_Items1]
		TemplateDef = var_Items1
		Template = [var_Items1.CellValue(AddItem(3),1) = 4]
	endwith
oGrid.EndUpdate()

608
Is it possible to disable standard single-click behavior for this column, so I manually could call Edit() when needed

/*
with (this.EXGRIDACTIVEXCONTROL1.nativeObject)
	DblClick = class::nativeObject_DblClick
endwith
*/
// Occurs when the user dblclk the left mouse button over an object.
function nativeObject_DblClick(Shift,X,Y)
	oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
	oGrid.Edit()
return

local oGrid,var_Editor,var_Editor1,var_Items,var_Items1

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.AutoEdit = false
oGrid.MarkSearchColumn = false
// oGrid.Columns.Add("Edit1").Editor.EditType = 1
var_Editor = oGrid.Columns.Add("Edit1").Editor
with (oGrid)
	TemplateDef = [dim var_Editor]
	TemplateDef = var_Editor
	Template = [var_Editor.EditType = 1]
endwith
// oGrid.Columns.Add("Edit2").Editor.EditType = 1
var_Editor1 = oGrid.Columns.Add("Edit2").Editor
with (oGrid)
	TemplateDef = [dim var_Editor1]
	TemplateDef = var_Editor1
	Template = [var_Editor1.EditType = 1]
endwith
var_Items = oGrid.Items
	// var_Items.CellValue(var_Items.AddItem(1),1) = 2
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(AddItem(1),1) = 2]
	endwith
var_Items1 = oGrid.Items
	// var_Items1.CellValue(var_Items1.AddItem(3),1) = 4
	with (oGrid)
		TemplateDef = [dim var_Items1]
		TemplateDef = var_Items1
		Template = [var_Items1.CellValue(AddItem(3),1) = 4]
	endwith
oGrid.EndUpdate()

607
How can I get or restore the old or previously value for the cell being changed
/*
with (this.EXGRIDACTIVEXCONTROL1.nativeObject)
	Change = class::nativeObject_Change
endwith
*/
// Occurs when the user changes the cell's content.
function nativeObject_Change(Item,ColIndex,NewValue)
	oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
	? "Old-Value:" 
	? Str(oGrid.Items.CellValue(Item,ColIndex)) 
	? "New-Value:" 
	? Str(NewValue) 
return

local oGrid,var_Editor,var_Editor1,var_Items,var_Items1

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.MarkSearchColumn = false
// oGrid.Columns.Add("Edit1").Editor.EditType = 1
var_Editor = oGrid.Columns.Add("Edit1").Editor
with (oGrid)
	TemplateDef = [dim var_Editor]
	TemplateDef = var_Editor
	Template = [var_Editor.EditType = 1]
endwith
// oGrid.Columns.Add("Edit2").Editor.EditType = 1
var_Editor1 = oGrid.Columns.Add("Edit2").Editor
with (oGrid)
	TemplateDef = [dim var_Editor1]
	TemplateDef = var_Editor1
	Template = [var_Editor1.EditType = 1]
endwith
var_Items = oGrid.Items
	// var_Items.CellValue(var_Items.AddItem(1),1) = 2
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(AddItem(1),1) = 2]
	endwith
var_Items1 = oGrid.Items
	// var_Items1.CellValue(var_Items1.AddItem(3),1) = 4
	with (oGrid)
		TemplateDef = [dim var_Items1]
		TemplateDef = var_Items1
		Template = [var_Items1.CellValue(AddItem(3),1) = 4]
	endwith
oGrid.EndUpdate()

606
How can I get the item from the cursor
/*
with (this.EXGRIDACTIVEXCONTROL1.nativeObject)
	MouseMove = class::nativeObject_MouseMove
endwith
*/
// Occurs when the user moves the mouse.
function nativeObject_MouseMove(Button,Shift,X,Y)
	local h
	oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
	h = oGrid.ItemFromPoint(-1,-1,c,hit)
	? "Handle" 
	? Str(h) 
	? "Index" 
	? Str(oGrid.Items.ItemToIndex(h)) 
return

local h,oGrid,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.LinesAtRoot = -1
oGrid.DrawGridLines = 1
oGrid.Columns.Add("Items")
var_Items = oGrid.Items
	h = var_Items.AddItem("R1")
	var_Items.InsertItem(h,null,"Cell 1.1")
	var_Items.InsertItem(h,null,"Cell 1.2")
	// var_Items.ExpandItem(h) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ExpandItem(h) = True]
	endwith
	h = var_Items.AddItem("R2")
	var_Items.InsertItem(h,null,"Cell 2.1")
	var_Items.InsertItem(h,null,"Cell 2.2")
	// var_Items.ExpandItem(h) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ExpandItem(h) = True]
	endwith
oGrid.EndUpdate()

605
How can I get the column from the cursor, not only in the header

/*
with (this.EXGRIDACTIVEXCONTROL1.nativeObject)
	MouseMove = class::nativeObject_MouseMove
endwith
*/
// Occurs when the user moves the mouse.
function nativeObject_MouseMove(Button,Shift,X,Y)
	oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
	? Str(oGrid.ColumnFromPoint(-1,0)) 
return

local h,oGrid,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.LinesAtRoot = -1
oGrid.Columns.Add("P1")
oGrid.Columns.Add("P2")
oGrid.DrawGridLines = -1
var_Items = oGrid.Items
	h = var_Items.AddItem("R1")
	// var_Items.CellValue(h,1) = "R2"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValue(h,1) = "R2"]
	endwith
	// var_Items.CellValue(var_Items.InsertItem(h,null,"Cell 1.1"),1) = "Cell 1.2"
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(InsertItem(h,,"Cell 1.1"),1) = "Cell 1.2"]
	endwith
	// var_Items.CellValue(var_Items.InsertItem(h,null,"Cell 2.1"),1) = "Cell 2.2"
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(InsertItem(h,,"Cell 2.1"),1) = "Cell 2.2"]
	endwith
	// var_Items.ExpandItem(h) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ExpandItem(h) = True]
	endwith
oGrid.EndUpdate()

604
How can I get the column from the cursor

/*
with (this.EXGRIDACTIVEXCONTROL1.nativeObject)
	MouseMove = class::nativeObject_MouseMove
endwith
*/
// Occurs when the user moves the mouse.
function nativeObject_MouseMove(Button,Shift,X,Y)
	oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
	? Str(oGrid.ColumnFromPoint(-1,-1)) 
return

local h,oGrid,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.LinesAtRoot = -1
oGrid.DrawGridLines = -1
oGrid.Columns.Add("P1")
oGrid.Columns.Add("P2")
var_Items = oGrid.Items
	h = var_Items.AddItem("R1")
	// var_Items.CellValue(h,1) = "R2"
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValue(h,1) = "R2"]
	endwith
	// var_Items.CellValue(var_Items.InsertItem(h,null,"Cell 1.1"),1) = "Cell 1.2"
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(InsertItem(h,,"Cell 1.1"),1) = "Cell 1.2"]
	endwith
	// var_Items.CellValue(var_Items.InsertItem(h,null,"Cell 2.1"),1) = "Cell 2.2"
	with (oGrid)
		TemplateDef = [dim var_Items]
		TemplateDef = var_Items
		Template = [var_Items.CellValue(InsertItem(h,,"Cell 2.1"),1) = "Cell 2.2"]
	endwith
	// var_Items.ExpandItem(h) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ExpandItem(h) = True]
	endwith
oGrid.EndUpdate()

603
How can I get the cell's caption from the cursor
/*
with (this.EXGRIDACTIVEXCONTROL1.nativeObject)
	MouseMove = class::nativeObject_MouseMove
endwith
*/
// Occurs when the user moves the mouse.
function nativeObject_MouseMove(Button,Shift,X,Y)
	local h
	oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
	h = oGrid.ItemFromPoint(-1,-1,c,hit)
	? oGrid.Items.CellCaption(h,c) 
return

local h,oGrid,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.LinesAtRoot = -1
oGrid.Columns.Add("Items")
var_Items = oGrid.Items
	h = var_Items.AddItem("R1")
	var_Items.InsertItem(h,null,"Cell 1.1")
	var_Items.InsertItem(h,null,"Cell 1.2")
	// var_Items.ExpandItem(h) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ExpandItem(h) = True]
	endwith
	h = var_Items.AddItem("R2")
	var_Items.InsertItem(h,null,"Cell 2.1")
	var_Items.InsertItem(h,null,"Cell 2.2")
	// var_Items.ExpandItem(h) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ExpandItem(h) = True]
	endwith
oGrid.EndUpdate()

602
How can I customize the items based on the values in the cells

local h,h1,oGrid,var_Column,var_Column1,var_Column2,var_Column3,var_Columns,var_ConditionalFormat,var_ConditionalFormat1,var_ConditionalFormat2,var_ConditionalFormats,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.MarkSearchColumn = false
var_ConditionalFormats = oGrid.ConditionalFormats
	var_ConditionalFormat = var_ConditionalFormats.Add("%1 >4")
		var_ConditionalFormat.Bold = true
		var_ConditionalFormat.StrikeOut = true
		var_ConditionalFormat.ForeColor = 0xff
		var_ConditionalFormat.ApplyTo = -1
	var_ConditionalFormat1 = var_ConditionalFormats.Add("%2 > 4")
		var_ConditionalFormat1.Bold = true
		var_ConditionalFormat1.StrikeOut = true
		var_ConditionalFormat1.ForeColor = 0xff
		var_ConditionalFormat1.ApplyTo = 2 /*0x2 | */
	var_ConditionalFormat2 = var_ConditionalFormats.Add("%3 > 4")
		var_ConditionalFormat2.Bold = true
		var_ConditionalFormat2.StrikeOut = true
		var_ConditionalFormat2.ForeColor = 0xff
		var_ConditionalFormat2.ApplyTo = 3 /*0x3 | */
var_Columns = oGrid.Columns
	var_Columns.Add("Name")
	var_Column = var_Columns.Add("A")
		var_Column.SortType = 1
		var_Column.AllowSizing = false
		var_Column.Width = 36
		var_Column.FormatColumn = "len(value) ? value + ' +'"
		var_Column.Editor.EditType = 4
	var_Column1 = var_Columns.Add("B")
		var_Column1.SortType = 1
		var_Column1.AllowSizing = false
		var_Column1.Width = 36
		var_Column1.FormatColumn = "len(value) ? value + ' +'"
		var_Column1.Editor.EditType = 4
	var_Column2 = var_Columns.Add("C")
		var_Column2.SortType = 1
		var_Column2.AllowSizing = false
		var_Column2.Width = 36
		var_Column2.FormatColumn = "len(value) ? value + ' ='"
		var_Column2.Editor.EditType = 4
	var_Column3 = var_Columns.Add("A+B+C")
		var_Column3.SortType = 1
		var_Column3.AllowSizing = false
		var_Column3.Width = 64
		var_Column3.ComputedField = "%1+%2+%3"
		var_Column3.FormatColumn = "((0:=dbl(value)) < 10? '<fgcolor=808080><font ;7>' :'<b>') + currency(=:0)"
		// var_Column3.Def(17) = 1
		with (oGrid)
			TemplateDef = [dim var_Column3]
			TemplateDef = var_Column3
			Template = [var_Column3.Def(17) = 1]
		endwith
var_Items = oGrid.Items
	h = var_Items.AddItem("Root")
	// var_Items.CellValueFormat(h,4) = 2
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValueFormat(h,4) = 2]
	endwith
	h1 = var_Items.InsertItem(h,null,"Child 1")
	// var_Items.CellValue(h1,1) = 7
	with (oGrid)
		TemplateDef = [dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.CellValue(h1,1) = 7]
	endwith
	// var_Items.CellValue(h1,2) = 3
	with (oGrid)
		TemplateDef = [dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.CellValue(h1,2) = 3]
	endwith
	// var_Items.CellValue(h1,3) = 1
	with (oGrid)
		TemplateDef = [dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.CellValue(h1,3) = 1]
	endwith
	h1 = var_Items.InsertItem(h,null,"Child 2")
	// var_Items.CellValue(h1,1) = 2
	with (oGrid)
		TemplateDef = [dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.CellValue(h1,1) = 2]
	endwith
	// var_Items.CellValue(h1,2) = 5
	with (oGrid)
		TemplateDef = [dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.CellValue(h1,2) = 5]
	endwith
	// var_Items.CellValue(h1,3) = 12
	with (oGrid)
		TemplateDef = [dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.CellValue(h1,3) = 12]
	endwith
	h1 = var_Items.InsertItem(h,null,"Child 3")
	// var_Items.CellValue(h1,1) = 2
	with (oGrid)
		TemplateDef = [dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.CellValue(h1,1) = 2]
	endwith
	// var_Items.CellValue(h1,2) = 2
	with (oGrid)
		TemplateDef = [dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.CellValue(h1,2) = 2]
	endwith
	// var_Items.CellValue(h1,3) = 4
	with (oGrid)
		TemplateDef = [dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.CellValue(h1,3) = 4]
	endwith
	h1 = var_Items.InsertItem(h,null,"Child 4")
	// var_Items.CellValue(h1,1) = 2
	with (oGrid)
		TemplateDef = [dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.CellValue(h1,1) = 2]
	endwith
	// var_Items.CellValue(h1,2) = 9
	with (oGrid)
		TemplateDef = [dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.CellValue(h1,2) = 9]
	endwith
	// var_Items.CellValue(h1,3) = 4
	with (oGrid)
		TemplateDef = [dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.CellValue(h1,3) = 4]
	endwith
	// var_Items.ExpandItem(h) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ExpandItem(h) = True]
	endwith
oGrid.EndUpdate()

601
Is it is possible to have a column computing values from other columns

local h,h1,oGrid,var_Column,var_Column1,var_Column2,var_Column3,var_Columns,var_Items

oGrid = form.EXGRIDACTIVEXCONTROL1.nativeObject
oGrid.BeginUpdate()
oGrid.MarkSearchColumn = false
var_Columns = oGrid.Columns
	var_Columns.Add("Name")
	var_Column = var_Columns.Add("A")
		var_Column.SortType = 1
		var_Column.AllowSizing = false
		var_Column.Width = 36
		var_Column.FormatColumn = "len(value) ? value + ' +'"
		var_Column.Editor.EditType = 4
	var_Column1 = var_Columns.Add("B")
		var_Column1.SortType = 1
		var_Column1.AllowSizing = false
		var_Column1.Width = 36
		var_Column1.FormatColumn = "len(value) ? value + ' +'"
		var_Column1.Editor.EditType = 4
	var_Column2 = var_Columns.Add("C")
		var_Column2.SortType = 1
		var_Column2.AllowSizing = false
		var_Column2.Width = 36
		var_Column2.FormatColumn = "len(value) ? value + ' ='"
		var_Column2.Editor.EditType = 4
	var_Column3 = var_Columns.Add("A+B+C")
		var_Column3.SortType = 1
		var_Column3.AllowSizing = false
		var_Column3.Width = 64
		var_Column3.ComputedField = "%1+%2+%3"
		var_Column3.FormatColumn = "((0:=dbl(value)) < 10? '<fgcolor=808080><font ;7>' :'<b>') + currency(=:0)"
		// var_Column3.Def(17) = 1
		with (oGrid)
			TemplateDef = [dim var_Column3]
			TemplateDef = var_Column3
			Template = [var_Column3.Def(17) = 1]
		endwith
var_Items = oGrid.Items
	h = var_Items.AddItem("Root")
	// var_Items.CellValueFormat(h,4) = 2
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.CellValueFormat(h,4) = 2]
	endwith
	h1 = var_Items.InsertItem(h,null,"Child 1")
	// var_Items.CellValue(h1,1) = 7
	with (oGrid)
		TemplateDef = [dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.CellValue(h1,1) = 7]
	endwith
	// var_Items.CellValue(h1,2) = 3
	with (oGrid)
		TemplateDef = [dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.CellValue(h1,2) = 3]
	endwith
	// var_Items.CellValue(h1,3) = 1
	with (oGrid)
		TemplateDef = [dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.CellValue(h1,3) = 1]
	endwith
	h1 = var_Items.InsertItem(h,null,"Child 2")
	// var_Items.CellValue(h1,1) = 2
	with (oGrid)
		TemplateDef = [dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.CellValue(h1,1) = 2]
	endwith
	// var_Items.CellValue(h1,2) = 5
	with (oGrid)
		TemplateDef = [dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.CellValue(h1,2) = 5]
	endwith
	// var_Items.CellValue(h1,3) = 12
	with (oGrid)
		TemplateDef = [dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.CellValue(h1,3) = 12]
	endwith
	h1 = var_Items.InsertItem(h,null,"Child 3")
	// var_Items.CellValue(h1,1) = 2
	with (oGrid)
		TemplateDef = [dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.CellValue(h1,1) = 2]
	endwith
	// var_Items.CellValue(h1,2) = 2
	with (oGrid)
		TemplateDef = [dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.CellValue(h1,2) = 2]
	endwith
	// var_Items.CellValue(h1,3) = 4
	with (oGrid)
		TemplateDef = [dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.CellValue(h1,3) = 4]
	endwith
	h1 = var_Items.InsertItem(h,null,"Child 4")
	// var_Items.CellValue(h1,1) = 2
	with (oGrid)
		TemplateDef = [dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.CellValue(h1,1) = 2]
	endwith
	// var_Items.CellValue(h1,2) = 9
	with (oGrid)
		TemplateDef = [dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.CellValue(h1,2) = 9]
	endwith
	// var_Items.CellValue(h1,3) = 4
	with (oGrid)
		TemplateDef = [dim var_Items,h1]
		TemplateDef = var_Items
		TemplateDef = h1
		Template = [var_Items.CellValue(h1,3) = 4]
	endwith
	// var_Items.ExpandItem(h) = true
	with (oGrid)
		TemplateDef = [dim var_Items,h]
		TemplateDef = var_Items
		TemplateDef = h
		Template = [var_Items.ExpandItem(h) = True]
	endwith
oGrid.EndUpdate()